I want to use RandomOverSampler function from imbalanced-learn module to perform oversampling the data with more than two classes. The following is my code with 3 classes:
import numpy as np
from imblearn.over_sampling import RandomOverSampler
data = np.random.randn(30,5)
label = np.random.randint(3, size=30)
ros = RandomOverSampler(random_state=3)
data_res, label_res = ada.fit_sample(data, label)
After running, it returns this warning:
UserWarning: The target type should be binary. warnings.warn('The target type should be binary.')
But the documentation says:
Notes
Supports mutli-class resampling.
Am I missing something to use it for multi class case? If this is only for binary class, is there any other library or module which supports multi class oversampling?