[Blocking][jvm-packages] fix the early stopping feature (#3808)
* add back train method but mark as deprecated * add back train method but mark as deprecated * add back train method but mark as deprecated * add back train method but mark as deprecated * fix scalastyle error * fix scalastyle error * fix scalastyle error * fix scalastyle error * temp * add method for classifier and regressor * update tutorial * address the comments * update
This commit is contained in:
@@ -183,6 +183,15 @@ After we set XGBoostClassifier parameters and feature/label column, we can build
|
||||
|
||||
val xgbClassificationModel = xgbClassifier.fit(xgbInput)
|
||||
|
||||
Early Stopping
|
||||
----------------
|
||||
|
||||
Early stopping is a feature to prevent the unnecessary training iterations. By specifying ``num_early_stopping_rounds`` or directly call ``setNumEarlyStoppingRounds`` over a XGBoostClassifier or XGBoostRegressor, we can define number of rounds for the evaluation metric going to the unexpected direction to tolerate before stopping the training.
|
||||
|
||||
In additional to ``num_early_stopping_rounds``, you also need to define ``maximize_evaluation_metrics`` or call ``setMaximizeEvaluationMetrics`` to specify whether you want to maximize or minimize the metrics in training.
|
||||
|
||||
After specifying these two parameters, the training would stop when the metrics goes to the other direction against the one specified by ``maximize_evaluation_metrics`` for ``num_early_stopping_rounds`` iterations.
|
||||
|
||||
Prediction
|
||||
==========
|
||||
|
||||
|
||||
Reference in New Issue
Block a user