Evaluation

Confusion matrix

A confusion matrix counts predictions by actual and predicted class.

Said yesSaid noActual yesTP 80FN 20Actual noFP 40TN 860Every prediction lands in exactly one of four cells.
A confusion matrix counts predictions by actual and predicted class. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

Its cells expose which classes are confused rather than collapsing performance into one number. Binary matrices contain true positives, false positives, false negatives, and true negatives.

A concrete example

Illustrative: [[TN 900, FP 20], [FN 30, TP 50]] over 1,000 examples.

Do not confuse it with Contingency table

a confusion matrix specifically crosses predicted and actual classes.

Study the full lesson