text_plain_output_1.png
from sklearn.linear_model import LogisticRegression

from sklearn.metrics import confusion_matrix, accuracy_score, roc_auc_score, plot_roc_curve, classification_report

model_lr = LogisticRegression(max_iter=120, random_state=0, n_jobs=20, solver='liblinear')

model_lr.fit(X_train, y_train)

trn_lr_pred = model_lr.predict(X_train)
trn_lr_acc = accuracy_score(trn_lr_pred, y_train)

tst_lr_pred = model_lr.predict(X_test)
tst_lr_acc = accuracy_score(tst_lr_pred, y_test)

trn_lr_smt_pred = model_lr.predict(X_train)
trn_lr_smt_acc = accuracy_score(trn_lr_smt_pred, y_train)

tst_lr_smt_pred = model_lr.predict(X_test)
tst_lr_smt_acc = accuracy_score(tst_lr_smt_pred, y_test)
print(round(tst_lr_smt_acc * 100, 2))