Explain like I'm five · AI Theory

What is a Confusion Matrix?

The confusion matrix, told as a story about a ledger that splits the sorter's calls against the real state into four boxes.

I've got 99% accuracy!only 1 of 100 is rotten — stamping everything PASS still scores 99%

The sorter boasts 99% accuracy.Only 1 of 100 is rotten — stamping everything PASS still scores 99%.

all PASS! all PASS! all PASS!misses the rotten one, every single timeand accuracy still reads 99%accuracy alone makes a model that always misses the rare case look great

Accuracy alone hides the mistake of missing rare rotten produce.Missing the rotten item every time still leaves the accuracy number looking fine.

a confusion matrix records the real state against the sorter's call, in four boxeswhat the sorter decidedcalled PASScalled REJECTthe real statereally PASSreally REJECTTN — correctly passed✓FP — wrongly rejected×FN — missed it (risky!)×TP — correctly rejected✓here rotten (REJECT) is positive — the four boxes show which kind of mistake it was

A confusion matrix is a ledger splitting each item's real state against the sorter's call into four boxes.Here a rotten item counts as positive. Not just one number — the ledger shows exactly which kind of mistake happened.

TP — correctly rejectedreally rotten, called REJECT
TN — correctly passedreally fine, called PASS
FP — a false alarmflags a fine one as rejected
FN — a miss (riskier here)lets a rotten one through
METRICS BUILT FROM THE FOUR BOXESaccuracy — correct out of everythingprecision — of what it called REJECT, how much was really rottenrecall — of what's really rotten, how much it caughtF1 score — the balance between precision and recall

Several metrics are computed straight from the four boxes.Which metric matters most depends on which kind of mistake costs more.

✓a rotten one gets through (FN) — it reaches a customer×a fine one gets rejected (FP) — only the farmer loses out

Which costs more, FN or FP, depends on the situation.Where the cutoff is set comes down to weighing these two costs against each other.

In one breath

Confusion matrix = a ledger splitting each item's real state against the sorter's call into four boxes (TP, TN, FP, FN).

A confusion matrix cross-tabulates a classifier's predictions against the ground truth into four boxes: TP (true positive), TN (true negative), FP (false positive), and FN (false negative). From these four numbers, metrics like accuracy, precision, recall, and the F1 score are derived. When a dataset is imbalanced, accuracy alone can't reveal a model's real performance — the confusion matrix has to be read alongside it.

When grown-ups say it

Confusion matrix
A ledger splitting the real state against the call into four boxes. Reveals the mistakes accuracy alone would hide.
Accuracy
Correct out of everything. Unreliable when the classes are imbalanced.
Precision
Of what it called REJECT, how much was really rotten. Matters most when false alarms are the costly mistake.
Recall
Of what's really rotten, how much it caught. Matters most when a miss is the costly mistake.
Imbalanced data
A situation where only 1 in 100 is rotten. Connects back to bias at the seed stage. → A Sorter Trained on Rotten Seed
Threshold
The cutoff line that splits PASS from REJECT. Moving this line trades off FP against FN.
False alarm vs. miss
A wrongful reject vs. letting a rotten one through. An adversarial attack ultimately shifts these same four numbers. → The Fake Dot Pattern Snuck Onto the Produce
ROC · AUC
The performance curve traced by sliding the threshold. Not one confusion matrix, but many of them strung together across thresholds.
Next story
The Operations Map That Walks the Whole Station →
Want another term as a picture book? Request →