Confusion matrix

For binary classification a 2×2 table of true positives, false positives, false negatives and true negatives (one row and column per class in the multiclass case). Accuracy, precision, recall and F1 are all computed from its cells.

Confusion matrix: true/false positives and negatives

Example

On 1,000 emails a spam filter has TP = 40, FP = 10, FN = 20, TN = 930: accuracy 97%, precision 0.8, recall ≈ 0.67.

Related terms

More in Evaluation & Validation