Skip to content

Commit 729fd97

Browse files
authored
[doc] Fix spark_estimator doc (dmlc#10066)
1 parent 9f7b94c commit 729fd97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/tutorials/spark_estimator.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ We can create a ``SparkXGBRegressor`` estimator like:
2828
.. code-block:: python
2929
3030
from xgboost.spark import SparkXGBRegressor
31-
spark_reg_estimator = SparkXGBRegressor(
31+
xgb_regressor = SparkXGBRegressor(
3232
features_col="features",
3333
label_col="label",
3434
num_workers=2,
@@ -61,7 +61,7 @@ type or spark array type.
6161

6262
.. code-block:: python
6363
64-
transformed_test_spark_dataframe = xgb_regressor.predict(test_spark_dataframe)
64+
transformed_test_spark_dataframe = xgb_regressor_model.transform(test_spark_dataframe)
6565
6666
6767
The above snippet code returns a ``transformed_test_spark_dataframe`` that contains the input

0 commit comments

Comments
 (0)