I tried running the following code:
from imblearn import under_sampling, over_sampling
from imblearn.over_sampling import SMOTE
sm = SMOTE(random_state=12, ratio = 1.0)
x_SMOTE, y_SMOTE = sm.fit_sample(X, y)
which gives me the error message:
ModuleNotFoundError: No module named 'imblearn'
I have tried installing the imblearn module in multiple ways, they all seem to work (there are no errors given during the installation but when I run the above code, I get an error message).
I tried istalling imblearn using the following suggested in other stackoverflow questions:
pip install -U imbalanced-learn
pip install imblearn
!pip install imblearn
pip install -c glemaitre imbalanced-learn
pip install imblearn==0.0
None of these seem to help... Any ideas? Thank you!
On AWS SageMaker, follow the documentation:
!pip install imbalanced-learn
in a notebook cell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With