text_plain_output_1.png
from sklearn.linear_model import LogisticRegression,LinearRegression

from sklearn.metrics import confusion_matrix, classification_report,accuracy_score

lr = LogisticRegression(random_state=0)
lr.fit(X_train, y_train)

y_pred_train = lr.predict(X_train)
y_pred_train

y_pred_test = lr.predict(X_test)

print('Accuracy: ' + str(accuracy_score(y_test, y_pred_test) * 100) + '%')