text_plain_output_1.png
from imblearn.over_sampling import SMOTE

from sklearn.linear_model import LogisticRegression

from sklearn.metrics import confusion_matrix,classification_report

y_train.value_counts()

from imblearn.over_sampling import SMOTE
sm = SMOTE(random_state=2)
X_train_res, y_train_res = sm.fit_resample(X_train, y_train.ravel())

lr1 = LogisticRegression()
lr1.fit(X_train_res, y_train_res)
predictions1 = lr1.predict(X_valid)

confusion_matrix(y_valid, predictions1)