We Are Going To Discuss About AttributeError: ‘SMOTE’ object has no attribute ‘fit_sample’. So lets Start this Python Article.
AttributeError: ‘SMOTE’ object has no attribute ‘fit_sample’
- How to solve AttributeError: 'SMOTE' object has no attribute 'fit_sample'
If you import like this
from imblearn.over_sampling import SMOTE
you need to dofit_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
you need to dofit_resample()
oversample = SMOTE() X, y = oversample.fit_resample(X, y)
Solution 1
If you import like this
from imblearn.over_sampling import SMOTE
you need to do fit_resample()
oversample = SMOTE()
X, y = oversample.fit_resample(X, y)
Original Author Subbu VidyaSekar Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.