This happened PipeOp colapply’s $train()

Error in .__Task__col_roles(self = self, private = private, super = super, :
Assertion on ‘names of col_roles’ failed: Names must be a permutation of set {‘feature’,’target’,’name’,’order’,’stratum’,’group’,’weight’,’always_included’}, but has extra elements {‘original_ids’}.
This happened PipeOp colapply’s $train()

首先,XGBoost 接受数值数据作为输入。虽然机器学习SE的xgboost模块了默认因子变量自动转换功能(因子数值编码),提供热编码(one-hot encoding)选项,但在某些情况下,默认因子转数方式可能导致模型运行出错。

避免此类问题,建议勾选“热编码”选项或在数据输入模型前因子变量转换数值变量确保数据格式符合 XGBoost 的要求。

20250521101804382-image

 

© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容