カテゴリ変数のエンコーディングのまとめ
目次 1.数字変数のエンコーディング 1.1 OrdinalEncoder 1.2 CountEncoder 2. ダミー値エンコーディング 2.1 OneHotEncoder 2.2 SumEncoder 2.3 BinaryEncoder 2.4 BaseNEncoder 2.5 HashingEncoder 3. 別のレベルの比較エンコーディング 3.1 HelmertEncoder 3.2 BackwardDifferenceEncoder 3.3 PolynomialEncoder 4. ターゲットありエンコーダー 4.1 TargetEncoder 4.2 LeaveOneOutEncoder 4.3 MEstimateEncoder 4.4 CatBoostEncoder 4.5 GLMMEncoder 4.6 JamesSteinEncoder 4.7 WOEEncoder ライブラリのインストール !pip install category_encoders ライブラリのインポート import category_encoders as ce 1.数字変数のエンコーディング 1.1 OrdinalEncoder サンプルデータ作成 import pandas as pd …