Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用交叉验证 (RFECV) 的递归特征消除不起作用,得到 KeyError: 'weight' 。如我所见,它无法计算系数,因此缺少权重。我有估计器作为 XGBClassifier。
新版本的 XGBoost - 1.0.0 不支持 RFECV,因此请尝试在旧版本的 XGBoost 包中运行相同的版本。
卸载包:!pip uninstall xgboost --y
安装旧包:!pip install xgboost==0.90 or 0.80
此外,RFECV 不适用于大型数据集(需要很长时间),即:列大小 >10000