scikit-learn-contrib / imbalanced-learn

A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning
https://imbalanced-learn.org
MIT License
6.85k stars 1.29k forks source link

ENH add auto inference based on pd.CategoricalDtype in SMOTENC #1009

Closed glemaitre closed 1 year ago

glemaitre commented 1 year ago

Add the option categorical_features="auto" that detects categorical features if they are using pd.CategoricalDtype in SMOTENC estimator.

In addition, we need to make sure that we don't only have numerical features after the inference, in which case, we raise an error.