在 R 中使用 tree_method = 'hist' 的 xgboost

数据挖掘 r xgboost 卡格尔
2022-02-22 16:24:46

根据 GBM 与 xgboost 与 LightGBM 的基准(https://www.kaggle.com/nschneider/gbm-vs-xgboost-vs-lightgbm),可以使用参数实现 xgboost

tree_method = 'hist' 

在 R。

但是这样做总是给我一个错误:

Error in xgb.iter.update(bst$handle, dtrain, iteration - 1, obj) : 
Invalid Input: 'hist', valid values are: {'approx', 'auto', 'exact'}

我错过了什么?

1个回答

hist较新版本的 XGBoost 中提供了快速模式。您可以在https://github.com/dmlc/xgboost/上找到信息

对于小型数据集(100k 行),您不会感觉到训练速度有太大提升。