Resampling to fix class imbalance.
Adds minority examples, keeping every majority row.
Drops majority examples. Faster to train, at the cost of discarding data.
Resample the training split only. Synthetic or duplicated rows in a test set produce a score that cannot be reproduced on real data — and with oversampling, near-copies of training rows end up in test, which inflates it outright. Passing these as pipeline steps to train handles this: they are applied inside each fold, to the training half.
Accuracy stays misleading after resampling. Judge on the original distribution, with a metric that respects the minority class.
ClassBalanceSampler filter.
Random oversampling methods for imbalanced learning....
ReservoirSampler filter.
SMOTE family of oversampling algorithms....
Undersampling methods for imbalanced learning....