Hong Nguyen Thi
Hong Nguyen Thi

Reputation: 11

Problems importing imblearn python package on Google Colab

I want to use SMOTE to resampling my dataset. When I'm on Google Colab and I tried to import the package using:

from imblearn.over_sampling import SMOTE

I get the error:

ImportError: cannot import name '_check_X' from 'imblearn.utils._validation' (/usr/local/lib/python3.10/dist-packages/imblearn/utils/_validation.py)

What can I do to fix this error? Thanks

Upvotes: 1

Views: 1082

Answers (1)

phung ngoc
phung ngoc

Reputation: 1

Use this code instead:

!pip install -U imbalanced-learn

Upvotes: 0

Related Questions