text_html_output_1.png
from sklearn.linear_model import LogisticRegression

from sklearn.metrics import f1_score

from sklearn.linear_model import LogisticRegression
from sklearn.metrics import f1_score
from sklearn.metrics import confusion_matrix
lr = LogisticRegression(solver='liblinear')
lr.fit(X_train, y_train)
y_pred = lr.predict(X_test)
print(f'F1 score is {f1_score(y_test, y_pred)}')