### Logistic Regression Model Instanization and Training

```
# Import the sklearn ML library - Logistic Regression
from sklearn.linear_model import LogisticRegression
# Instance of the estimator
logistic_regression = LogisticRegression(n_jobs=-1, random_state =15)
# train the estimator
logistic_regression.fit(X_train, y_train)
# Evaluate the model
y_pred_test = logistic_regression.predict(X_test)
# we conduct our evaluation using these 3 _score
eval_metrix.loc['accuracy', 'LogisticReg Model']= accuracy_score(y_pred=y_pred_test, y_true=y_test)
eval_metrix.loc['precision', 'LogisticReg Model']= precision_score(y_pred=y_pred_test, y_true=y_test)
eval_metrix.loc['recall', 'LogisticReg Model']= recall_score(y_pred=y_pred_test, y_true=y_test)
# Confusion matrix for the logistic regression
CM = confusion_matrix(y_pred=y_pred_test, y_true=y_test)
CMatrix(CM)
```