【问题标题】:How can I specify the number of the trees in my xgboost model ,using xgb.train?如何使用 xgb.train 在我的 xgboost 模型中指定树的数量?
【发布时间】:2017-11-07 17:15:22
【问题描述】:

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

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

我在谷歌上搜索并没有找到任何答案,在此先感谢。

【问题讨论】:

  • 您好,您的问题解决了吗?
  • @VivekKumar 是的,谢谢!

标签: python scikit-learn xgboost


【解决方案1】:

它的num_boost_round。如api documentation 所述:

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

要完全匹配 xgb.train 和 scikit 包装器(XGBRegressor 或 XGBClassifier)的输出,您可以在此处查看我的其他答案:

【讨论】:

    猜你喜欢
    • 2016-10-07
    • 2018-10-29
    • 2018-02-04
    • 2019-03-03
    • 2019-08-07
    • 1970-01-01
    • 1970-01-01
    • 2018-12-30
    • 1970-01-01
    相关资源
    最近更新 更多