Concept 06 / Reading a metric
The accuracy
trap.
Fraud is rare. A model that calls every transaction legitimate can score almost perfectly on accuracy while catching nothing. Change the base rate and decision threshold to see what the headline number hides.
Inspect 400 transactions
Synthetic scores and exact browser-side metric calculations.
01 / Every square is a transaction
Rare events are easy to missCorrect legitimateCaught fraudMissed fraudFalse alarm
Select a square to inspect its true label, score, and decision.
02 / Look beyond accuracy
Same predictions · four metricsAccuracy—All correct decisions / all transactions
Precision—Caught fraud / all fraud alerts
Recall—Caught fraud / all actual fraud
F1 score—Balance of precision and recall
03 / Where did each case go?
Confusion matrixPREDICTED LEGITIMATE
PREDICTED FRAUD
True negative—Correct legitimate
False positive—False alarm
False negative—Missed fraud
True positive—Caught fraud
Weighted error cost
—1 unit per false alarm; 10 units per missed fraud.
Try this: Select “Always legitimate” at a 1% fraud rate. Then switch to the scored model and move the threshold. Which metric reveals the missed fraud?