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 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容