I have a unbalanced dataset with 5 classes. Now i want so undersample it to make it more balanced. But i can´t find a code for this, just for binary class problems.
Do someone have a sample code?
I have a unbalanced dataset with 5 classes. Now i want so undersample it to make it more balanced. But i can´t find a code for this, just for binary class problems.
Do someone have a sample code?
Use SMOTE for that. Here is how you undersample: https://imbalanced-learn.readthedocs.io/en/stable/under_sampling.html