xgboost参数解释

本文详细解析了XGBoost中的参数,包括通用参数、booster参数和任务参数。重点介绍了eta、gamma、max_depth、min_child_weight等关键参数的作用和调整方法,以帮助优化模型性能。此外,还提及了在R包中如何设置参数,并提供了训练过程中的监控和评估指标。
摘要由CSDN通过智能技术生成

XGBoost参数,xgboost最终要的部分就是参数的配置

在运行XGboost主要设置的三种类型参数:general parameters,booster parameters和task parameters:

General parameters
参数控制在提升(boosting)过程中使用哪种booster,常用的booster有树模型(tree)和线性模型(linear model)。
booster [default=gbtree]
gbtree 和 gblinear

silent [default=0]
0表示输出信息, 1表示安静模式

Booster parameters:这取决于使用哪种booster。
一般情况下gbtree比gblinear要更好用
Task parameters:控制学习的场景,例如在回归问题中会使用不同的参数控制排序。
除了以上参数还可能有其它参数,在命令行中使用
Parameters in R Package

In R-package, you can use .(dot) to replace under score in the parameters, for example, you can use max.depth as max_depth. The underscore parameters are also valid in R.

一般参数/General Parameters

booster [default=gbtree]
有两中模型可以选择gbtree和gblinear。gbtree使用基于树的模型进行提升计算,gblinear使用线性模型进行提升计算。缺省值为gbtree
silent [default=0]
取0时表示打印出运行时信息,取1时表示以缄默方式运行,不打印运行时信息。缺省值为0
nthread [default to maximum number of threads available if not set]
XGBoost运行时的线程数。缺省值是当前系统可以获得的最大线程数
num_pbuffer [set automatically by xgboost, no need to be set by user]
size of prediction buffer, normally set to number of training instances. The buffers are used to save the prediction results of last boosting step.
num_feature [set automatically by xgboost, no need to be set by user]
boosting过程中用到的特征维数,设置为特征个数。XGBoost会自动设置,不需要手工设置

*集成(增强)参数/booster parameters
eta [default=0.3]
为了防止过拟合,更新过程中用到的收缩步长。在每次提升计算之后,算法会直接获得新特征的权重。 eta通过缩减特征的权重使提升计算过程更加保守。缺省值为0.3
取值范围为:[0,1]
gamma [default=0] ,这个参数可能调整也可能不调整
为了对树的叶子节点做进一步的分割而必须设置的损失减少的最小值,该值越大,算法越保守.
range: [0,∞] <

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值