XGBoost处理缺失值(Null)问题

对于数据缺失的问题,XGBoost设计了很好的默认机制处理这个问题。以下摘自陈天奇在GitHub讨论组中的讨论。

  • You can directly feed data in as sparse matrix, and only contains non-missing value. i.e. features that are not presented in the sparse feature matrix are treated as ‘missing’.
  • XGBoost will handle it internally and you do not need to do anything on it.
  • It will depends on how you present the data. If you put data in as LIBSVM format, and list zero features there, it will not be treated as missing.
  • Internally, XGBoost will automatically learn what is the best direction to go when a value is missing. Equivalently, this can be viewed as automatically “learn” what is the best imputation value for missing values based on reduction on training loss.

当数据中含有缺失值的时候,我们可以不再填充缺失值。利用XGBoost的机制自动处理缺失值。这时候需要生成libsvm格式的数据。(补充:其实其他格式的数据也可以,我理解错了。)
具体讨论见链接点击。</

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值