As far as I can tell, broadly speaking, there are three ways of dealing with binary imbalanced datasets:
Option 1:
- Create k-fold Cross-Validation samples randomly (or even better create k-fold samples using Stratified k-fold: https://scikit-learn.org/0.16/modules/generated/sklearn.cross_validation.StratifiedKFold.html ).
- For each fold apply a resampling technique (upsampling, downsampling or a combination of both) separately on the "training" and "test" sets.
- Use a "traditional" metric for evaluation: for instance the AUC of the ROC curve (TP Rate vs FP Rate).
Option 2:
- Create k-fold Cross-Validation samples randomly (or even better create k-fold samples using Stratified k-fold).
- Do not apply any resampling technique.
- Use an "alternative" metric for evaluation: for instance the AUC of the Precision-Recall curve or something like the F-score (the harmonic mean of Precision and Recall).
Option 3:
- Use something like XGBoost and tune the
scale_pos_weight
( https://xgboost.readthedocs.io/en/latest/tutorials/param_tuning.html ). - Create k-fold Cross-Validation samples randomly (or even better create k-fold samples using Stratified k-fold).
- Use a "traditional" metric for evaluation: for instance the AUC of the ROC curve (TP Rate vs FP Rate).
My main question is if I correctly interpret what the options are. Is there any conceptual mistake in what I'm saying? Is it appropriate to use Stratified k-fold in the three cases when dealing with imbalance? Is it not necessary to apply any resampling when using XGBoost and tuning scale_pos_weight
? When some resampling is applied (Options 1 and 3) does it make sense to use a "traditional" metric and does not make sense to use an "alternative" metric? In general, the resampling has to be applied separately on training and test sets? Etc.
Also, it would be nice if you have any good reference to SMOTE and ROSE, regarding how they work, how to apply them and how to use them with python.