如何使用 xgb.train 在我的 xgboost 模型中指定树的数量



如果我使用 xgb.train,如何指定模型中树的数量?

在xgboost中。XGBRegressor(),我知道我可以使用参数'n_estimators',但是我应该在xgb.train()中做什么?

我搜索了谷歌,没有找到任何答案,提前谢谢。

它的num_boost_round .如 api 文档中所述:

num_boost_round (int) – 提升迭代次数。

要完全匹配xgb.train和scikit包装器(XGBRegressor或XGBClassifier)的输出,你可以在这里看看我的另一个答案:

  • https://stackoverflow.com/a/46947191/3374996

最新更新