application_vnd.jupyter.stderr_output_2.png text_plain_output_1.png
from sklearn.linear_model import LogisticRegression

from sklearn.metrics import accuracy_score

from sklearn.metrics import classification_report

from sklearn.metrics import confusion_matrix

logistic_model = LogisticRegression()
logistic_model.fit(X_train, y_train)
predicted = logistic_model.predict(X_test)
lr_accuracy = accuracy_score(y_test, predicted)
print('Logistic Regression Accuracy: {:.2f}%'.format(lr_accuracy * 100))
report = classification_report(y_test, predicted)
print(report)
matrix = confusion_matrix(y_test, predicted)
print(matrix)