[PySpark] fix raw_prediction_col parameter and minor cleanup (#8067)

This commit is contained in:
Bobby Wang 2022-07-16 17:58:57 +08:00 committed by GitHub
parent 0ce80b7bcf
commit 91bb9e2cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -88,7 +88,7 @@ _pyspark_param_alias_map = {
"features_col": "featuresCol", "features_col": "featuresCol",
"label_col": "labelCol", "label_col": "labelCol",
"weight_col": "weightCol", "weight_col": "weightCol",
"raw_prediction_ol": "rawPredictionCol", "raw_prediction_col": "rawPredictionCol",
"prediction_col": "predictionCol", "prediction_col": "predictionCol",
"probability_col": "probabilityCol", "probability_col": "probabilityCol",
"validation_indicator_col": "validationIndicatorCol", "validation_indicator_col": "validationIndicatorCol",

View File

@ -33,15 +33,15 @@ class SparkXGBRegressor(_SparkXGBEstimator):
callbacks: callbacks:
The export and import of the callback functions are at best effort. The export and import of the callback functions are at best effort.
For details, see :py:attr:`xgboost.spark.SparkXGBRegressor.callbacks` param doc. For details, see :py:attr:`xgboost.spark.SparkXGBRegressor.callbacks` param doc.
validationIndicatorCol validation_indicator_col
For params related to `xgboost.XGBRegressor` training For params related to `xgboost.XGBRegressor` training
with evaluation dataset's supervision, set with evaluation dataset's supervision, set
:py:attr:`xgboost.spark.SparkXGBRegressor.validationIndicatorCol` :py:attr:`xgboost.spark.SparkXGBRegressor.validation_indicator_col`
parameter instead of setting the `eval_set` parameter in `xgboost.XGBRegressor` parameter instead of setting the `eval_set` parameter in `xgboost.XGBRegressor`
fit method. fit method.
weightCol: weight_col:
To specify the weight of the training and validation dataset, set To specify the weight of the training and validation dataset, set
:py:attr:`xgboost.spark.SparkXGBRegressor.weightCol` parameter instead of setting :py:attr:`xgboost.spark.SparkXGBRegressor.weight_col` parameter instead of setting
`sample_weight` and `sample_weight_eval_set` parameter in `xgboost.XGBRegressor` `sample_weight` and `sample_weight_eval_set` parameter in `xgboost.XGBRegressor`
fit method. fit method.
xgb_model: xgb_model:
@ -121,7 +121,7 @@ class SparkXGBClassifier(_SparkXGBEstimator, HasProbabilityCol, HasRawPrediction
another param called `base_margin_col`. see doc below for more details. another param called `base_margin_col`. see doc below for more details.
SparkXGBClassifier doesn't support setting `output_margin`, but we can get output margin SparkXGBClassifier doesn't support setting `output_margin`, but we can get output margin
from the raw prediction column. See `rawPredictionCol` param doc below for more details. from the raw prediction column. See `raw_prediction_col` param doc below for more details.
SparkXGBClassifier doesn't support `validate_features` and `output_margin` param. SparkXGBClassifier doesn't support `validate_features` and `output_margin` param.
@ -130,19 +130,19 @@ class SparkXGBClassifier(_SparkXGBEstimator, HasProbabilityCol, HasRawPrediction
callbacks: callbacks:
The export and import of the callback functions are at best effort. For The export and import of the callback functions are at best effort. For
details, see :py:attr:`xgboost.spark.SparkXGBClassifier.callbacks` param doc. details, see :py:attr:`xgboost.spark.SparkXGBClassifier.callbacks` param doc.
rawPredictionCol: raw_prediction_col:
The `output_margin=True` is implicitly supported by the The `output_margin=True` is implicitly supported by the
`rawPredictionCol` output column, which is always returned with the predicted margin `rawPredictionCol` output column, which is always returned with the predicted margin
values. values.
validationIndicatorCol: validation_indicator_col:
For params related to `xgboost.XGBClassifier` training with For params related to `xgboost.XGBClassifier` training with
evaluation dataset's supervision, evaluation dataset's supervision,
set :py:attr:`xgboost.spark.SparkXGBClassifier.validationIndicatorCol` set :py:attr:`xgboost.spark.SparkXGBClassifier.validation_indicator_col`
parameter instead of setting the `eval_set` parameter in `xgboost.XGBClassifier` parameter instead of setting the `eval_set` parameter in `xgboost.XGBClassifier`
fit method. fit method.
weightCol: weight_col:
To specify the weight of the training and validation dataset, set To specify the weight of the training and validation dataset, set
:py:attr:`xgboost.spark.SparkXGBClassifier.weightCol` parameter instead of setting :py:attr:`xgboost.spark.SparkXGBClassifier.weight_col` parameter instead of setting
`sample_weight` and `sample_weight_eval_set` parameter in `xgboost.XGBClassifier` `sample_weight` and `sample_weight_eval_set` parameter in `xgboost.XGBClassifier`
fit method. fit method.
xgb_model: xgb_model: