From 729fd9719646cd1e0636d94a7a7e5f9158e27429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Morales?= Date: Thu, 22 Feb 2024 22:01:24 -0600 Subject: [PATCH] [doc] Fix spark_estimator doc (#10066) --- doc/tutorials/spark_estimator.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tutorials/spark_estimator.rst b/doc/tutorials/spark_estimator.rst index 8bd1dcd97a76..4e608440a536 100644 --- a/doc/tutorials/spark_estimator.rst +++ b/doc/tutorials/spark_estimator.rst @@ -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