AttributeError: ‘SMOTE’ object has no attribute ‘fit_sample’

Attributeerror: ‘Smote’ Object Has No Attribute ‘Fit_Sample’

We Are Going To Discuss About AttributeError: ‘SMOTE’ object has no attribute ‘fit_sample’. So lets Start this Python Article.

How to resolve AttributeError: ‘SMOTE’ object has no attribute ‘fit_sample’

If you import like this
from imblearn.over_sampling import SMOTE
it’s essential to do fit_resample()
oversample = SMOTE() X, y = oversample.fit_resample(X, y)

AttributeError: ‘SMOTE’ object has no attribute ‘fit_sample’

If you import like this
from imblearn.over_sampling import SMOTE
it’s essential to do fit_resample()
oversample = SMOTE() X, y = oversample.fit_resample(X, y)

If you import like this

from imblearn.over_sampling import SMOTE

it’s essential to do fit_resample()

oversample = SMOTE()
X, y = oversample.fit_resample(X, y)

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Leave a Reply

Your email address will not be published. Required fields are marked *