Part 2 · Lesson 14 · 6 min
Measuring success: accuracy is not enough
A fraud model is 99.9% accurate. It also never catches a single fraud. How?
The trick is in what "accurate" counts.
Accuracy is the share of answers a model gets right. It sounds like the only number you need. But when the thing you are looking for is rare, a model can score brilliantly by never finding it.
The lazy model
So for rare events, always ask a second question: of the cases that mattered, how many did the model catch? The lazy model caught zero.
It also helps to split mistakes into two kinds. A smoke alarm makes both.
Two kinds of mistake
A false positive is an alarm for something that is not there. A false negative is missing something that is there. They are rarely equally bad. A false cancer alarm means a worried patient and another test. A missed cancer can cost a life.
The trade-off dial
Most models give a score, and a threshold turns that score into yes or no. Moving the threshold trades one mistake for the other. The model does not pick the setting. People do, based on what each mistake costs.
Go deeper optional
Two numbers fix most of accuracy's blind spots:
- Precision: of everything the model flagged, how much was real? Low precision means many false alarms.
- Recall (also called sensitivity): of everything real, how much did the model flag? Low recall means many misses.
Specificity is the mirror of recall: of everything harmless, how much did the model correctly leave alone?
The base rate trap: when something is rare, even a good test produces many false alarms. If 1 in 1,000 payments is fraud and a model flags 1% of payments, most of those flags are innocent customers, even if it catches every fraud.
Check yourself
1. Fraud is 1 in 1,000 transactions. A model that never flags fraud has what accuracy?
It is right on all 999 honest transactions. That is exactly why accuracy misleads with rare events.
2. A cancer screening test misses a real cancer. That is a...
A false negative misses something that is there. A false positive is an alarm for something that is not.
3. Who should decide how jumpy a fraud alarm is?
The threshold is a business and safety decision about which mistake is worse.