设置 XGBoost 提前停止的 Tol

Chr*_*rry 6 python machine-learning xgboost

我正在使用 XGBoost 并提前停止。经过大约 1000 个 epoch 后,模型仍在改进,但改进的幅度非常低。IE:

 clf = xgb.train(params, dtrain, num_boost_round=num_rounds, evals=watchlist, early_stopping_rounds=10)
Run Code Online (Sandbox Code Playgroud)

是否可以设置提前停止的“tol”?即:不触发提前停止所需的最低改进水平。

Tol 是 SKLearn 模型中的常用参数,例如 MLPClassifier 和 QuadraticDiscriminantAnalysis。谢谢。

Ben*_*Des 1

我不认为xgboost中有参数,tol但你可以设置early_stopping_round更高。这个参数意味着如果测试集上的性能多次没有改善early_stopping_round,那么它就会停止。如果您知道在 1000 个 epoch 后,您的模型仍在改进,但速度非常缓慢,early_stopping_round例如设置为 50,这样它将更“容忍”性能的微小变化。