[doc] Fix spark_estimator doc (#10066)

This commit is contained in:
José Morales 2024-02-22 22:01:24 -06:00 committed by GitHub
parent 9f7b94cf70
commit 729fd97196
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ We can create a ``SparkXGBRegressor`` estimator like:
.. code-block:: python
from xgboost.spark import SparkXGBRegressor
spark_reg_estimator = SparkXGBRegressor(
xgb_regressor = SparkXGBRegressor(
features_col="features",
label_col="label",
num_workers=2,
@ -61,7 +61,7 @@ type or spark array type.
.. code-block:: python
transformed_test_spark_dataframe = xgb_regressor.predict(test_spark_dataframe)
transformed_test_spark_dataframe = xgb_regressor_model.transform(test_spark_dataframe)
The above snippet code returns a ``transformed_test_spark_dataframe`` that contains the input