I have gotten stuck with importing RUSBoostClassifier following this example
from imblearn.ensemble import RUSBoostClassifier
I receive the following error:
ImportError Traceback (most recent call last)
<ipython-input-12-d0ff5157a81a> in <module>
----> 1 from imblearn.ensemble import RUSBoostClassifier
2 from sklearn.datasets import make_classification
3
4 X, y = make_classification(n_samples=1000, n_classes=3,
5 n_informative=4, weights=[0.2, 0.3, 0.5],
ImportError: cannot import name 'RUSBoostClassifier'
I do not understand why! I can easily use other modules from imblearn such as
from imblearn.under_sampling import RandomUnderSampler
or
from imblearn.over_sampling import SMOTE
I use Jupyter notebook, the Python version is 3.6.6. I have updated sklearn package and reinstall imblearn package following this link.
Does anyone have any idea to solve this problem? Or have an idea to use directly this class (source code) in a code?