I am working with "imblearn" library for undersampling. I have four classes in my dataset each having 20, 30, 40 and 50 number of data(as it is an imbalanced class).
But when I try to undersample the dataset using "fit_resample(X, y)", it only undersamples the first and last classes.
Is there any way I can undersample all the four classes using "imblearn"?
Necessary code:
undersample = RandomUnderSampler(sampling_strategy='majority')
X_over, y_over = undersample.fit_resample(X, y)