python - Scikit 学习 API xgboost 允许在线培训吗?

标签 python machine-learning scikit-learn xgboost

根据 API,正常的 xgboost 接口(interface)似乎允许此选项:

xgboost.train(params, dtrain, num_boost_round=10, evals=(), obj=None, feval=None, maximize=False, early_stopping_rounds=None, evals_result=None, verbose_eval=True, xgb_model=None , callbacks=None, learning_rates=None).

在此选项中,可以输入 xgb_model 以允许在同一模型上继续训练。

但是,我正在使用 xgboost 的 scikit learn API,因此我可以将分类器放入 scikit 管道中,连同其他不错的工具,例如用于超参数调整的随机搜索。

那么有没有人知道允许对 xgboost 的 scikitlearn api 进行在线培训的任何(尽管是 hacky)方法?

最佳答案

我认为 sklearn 包装器没有增量训练模型的选项。使用 warm_start 参数可以在一定程度上实现这一壮举。但是,XGBoost 的 sklearn 包装器没有该参数。 因此,如果您想进行增量训练,您可能必须切换到 xgboost 的官方 API 版本。

关于python - Scikit 学习 API xgboost 允许在线培训吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45154751/

相关文章:

python - 将 python 文件上传到 github 时包含外部 python 库

pandas - python 如何选择每个用户最新的样本作为测试数据?

r - R 中 SVM 的错误

scikit-learn - 一类分类使用哪些算法?

python - 在多个 pcaps 上使用 pynids

python - 使用 matplotlib 在直线上的特定点插入点

python - 如何选择数据框中大于给定值的所有元素

python - 模糊分组,相似词分组

python-3.x - 类型错误 : only integer scalar arrays can be converted to a scalar index while in KFold

python - 从逻辑回归(Python)中获取摘要