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.8k stars 1.28k forks source link

model hyperparameters be adjusted before and after oversampling? #1087

Open sshenbao opened 2 months ago

sshenbao commented 2 months ago

** If your issue is a usage question, submit it here instead:

Bokang-ctrl commented 1 month ago

Yes. When determining if oversampling has an effect, it's best to consider model hyperparams before and after oversampling.

If you trained the model before oversampling, you will optimize the model on the original dataset.

When you apply oversampling, the data distribution changes and that will affect the optimal hyperparameters. You will have to re-tune the hyperparameters.