optuna.integration.XGBoostPruningCallback
- class optuna.integration.XGBoostPruningCallback(trial, observation_key)[源代码]
Callback for XGBoost to prune unpromising trials.
See the example if you want to add a pruning callback which observes validation AUC of a XGBoost model.
- 参数
trial (optuna.trial._trial.Trial) – A
Trialcorresponding to the current evaluation of the objective function.observation_key (str) – An evaluation metric for pruning, e.g.,
validation-errorandvalidation-merror. When using the Scikit-Learn API, the index number ofeval_setmust be included in theobservation_key, e.g.,validation_0-errorandvalidation_0-merror. Please refer toeval_metricin XGBoost reference for further details.
- 返回类型
None