Alternative Solution Using Scikit Learn Confusion Matrix in binary case

Screen Link:
Mission Calculating Error Metrices

My Code:

import pandas as pd
from sklearn.metrics import confusion_matrix

tn, fp, fn, tp = confusion_matrix(loans["loan_status"], predictions ).ravel()

Used scikit approach using confusion matrix as an alternative SOlution

2 Likes