【问题标题】:XGBoost: why does test error increase when train error decreases in XGBoost?XGBoost:为什么当 XGBoost 中的训练误差减少时,测试误差会增加?
【发布时间】:2017-08-30 08:44:24
【问题描述】:

当我通过 xgboost 训练模型时,我发现“eval-merror”正在增加而“train-merror”正在减少,如下所示;是否有错误?

enter image description here

【问题讨论】:

    标签: xgboost


    【解决方案1】:

    您可能过度拟合。您是否尝试过设置 early_stopping_rounds?一旦 xgboost 检测到验证错误正在增加,这将终止训练。

    如果从第一个训练步骤开始就出现这种行为,您可能需要尝试较小的学习率(称为 eta)。

    您可以在api参考中找到有关刚才提到的参数的更多信息:http://xgboost.readthedocs.io/en/latest/python/python_api.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-12-09
      • 2019-09-01
      • 1970-01-01
      • 2018-06-30
      • 1970-01-01
      • 2016-10-30
      • 2018-11-05
      相关资源
      最近更新 更多