Confusion Matrix

Also known as · evaluation metrics

A table of true negatives, false positives, false negatives and true positives that shows exactly where a classifier goes wrong. It is the basis for Precision and Recall.

When to use

Use it instead of accuracy when classes are imbalanced: if only 5% of members churn, predicting that nobody churns scores 95% accuracy and is useless. In scikit-learn it comes from confusion_matrix and classification_report.

See DS Lec 3.

Appears in