Up to 100% for model equals 1-ohe_target feature without modeling and generalizing anything.
- Use pipelines
- Use arguments to skip one column during OHE
- Check importances of features for trained models
Instead of
X_train, y_train = (
cc_apps_train_cat_encoding.iloc[:, :-1].values,
cc_apps_train_cat_encoding.iloc[:, [-1]].values,
)
skip the column that was wrongly left during OHE
X_train = cc_apps_train_cat_encoding.iloc[:, :-2].values
y_train = cc_apps_train_cat_encoding.iloc[:, [-1]].values
Modeling
Fit, separation on target and features