You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Blocking][jvm-packages] fix the early stopping feature (dmlc#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
Copy file name to clipboardExpand all lines: doc/jvm/xgboost4j_spark_tutorial.rst
+9
Original file line number
Diff line number
Diff line change
@@ -183,6 +183,15 @@ After we set XGBoostClassifier parameters and feature/label column, we can build
183
183
184
184
val xgbClassificationModel = xgbClassifier.fit(xgbInput)
185
185
186
+
Early Stopping
187
+
----------------
188
+
189
+
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.
190
+
191
+
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.
192
+
193
+
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.
0 commit comments