Confusion Matrix

In [88]:
# Confusion Matrix - Test data
# Using metrics.confusion_matrix function
cm = metrics.confusion_matrix(test_y, test_predictions)
data = cm.tolist()
print("cm returned from sklearn:", data)
display_confusion_matrix(data)
cm returned from sklearn: [[573, 120], [212, 1043]]
True Negative

573
False Positive

120
False Negative

212
True Positive

1043