text_plain_output_1.png
from imblearn.combine import SMOTETomek

from imblearn.over_sampling import ADASYN

from imblearn.under_sampling import TomekLinks

from imblearn.over_sampling import ADASYN
ada = ADASYN(random_state=42)
X_ada, y_ada = ada.fit_resample(X_train, y_train)

from imblearn.combine import SMOTETomek
from imblearn.under_sampling import TomekLinks
print('Initial size:', X_train.shape)
smt = SMOTETomek(tomek=TomekLinks(sampling_strategy='majority'))
X_smt, y_smt = smt.fit_resample(X_train, y_train)
print('Resampled size:', X_smt.shape)