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 として推定器を持っています。
RFECV は新しいバージョンの XGBoost - 1.0.0 ではサポートされていないため、古いバージョンの XGBoost パッケージで同じことを実行してみてください。
パッケージのアンインストール: !pip uninstall xgboost --y
古いパッケージをインストールします: !pip install xgboost==0.90 または 0.80
また、RFECV は、大規模なデータセット (列サイズ > 10000) では機能しません (時間がかかります)。