#033Video này và phần văn bản của video bằng tiếng Anh.
The accuracy paradox: 98% accurate and it catches nothing
When the thing you hunt for is rare, a model that never finds it can still score 98%. Learn the accuracy paradox and the baseline to check before celebrating.
Chi tiết
What the accuracy paradox is
Accuracy is the share of answers a model gets right. It sounds like the obvious way to grade a model. But when the thing you are looking for is rare, accuracy turns against you: a model can post an excellent score while being useless at its actual job. That is the accuracy paradox. The headline number looks great, and the behaviour you care about is missing.
It happens because accuracy counts every answer the same. If almost all cases are ordinary, getting the ordinary ones right is enough to keep the average high, no matter what happens to the rare ones.
What the video shows
When what you are looking for is rare, a model that never finds it can still score 98%. The lesson of the video is a habit: before celebrating any score, check what the laziest possible answer would get.
An everyday example
Imagine a smoke alarm that never goes off, no matter what. In most homes, on most days, there is no fire. Grade that alarm on "days it was right" and it looks close to perfect. It is also worthless on the one day that counts. Accuracy rewards it for every quiet day and barely notices the day it slept through.
The numbers behind it
In the free course, a model inspects parts on a factory belt, and only 1.85% of them are defective.
- The lazy answer says "fine" for every single part. It is right 98.15% of the time and catches zero defective parts.
- The trained model reaches 98.30%. It beats doing nothing by just 0.15 percentage points, and it finds only 8 of the 74 defective parts.
A report that stops at accuracy would call that a win.
It gets stranger. The model calls a part defective when its estimated chance passes a cut-off. Lower the cut-off so it flags more parts, and it catches more defects: 8, then 27, then 42, and in the end 71 of the 74. Over the same steps, accuracy falls from 98.30% to 65.93%, because each extra catch drags in many more false alarms on good parts. The more useful the model gets, the worse its accuracy looks. A team chasing accuracy alone would ship the version that finds almost nothing: 8 defects out of 74.
How to spot it
- Score the lazy answer first. Always predict the most common outcome and see what accuracy that earns. That is your real zero, not 0%.
- Count the rare cases you caught. Of all the defective parts, how many did the model find? (That share is called recall and has its own video.)
- Distrust a tiny lead. Beating the lazy answer by a fraction of a point is not evidence that the model works.
- Ask how the rare case is doing, not how the average is doing. The rare case is usually why the model exists.
Why it matters
The rare cases are often the ones that matter most: the faulty part, the fraudulent payment, the sick patient. They are exactly the cases accuracy is worst at seeing, because the common cases carry the average. Checking the lazy baseline takes a minute and can save you from shipping a model that looks brilliant and does nothing.
Learn it step by step in Chapter 4 of our free course AI From Scratch: Classification, Cross-Entropy, and How Not to Fool Yourself.
Cũng có trên
Thêm từ chương này
#033
#034Cross-entropy: the score that makes AI pay for confident mistakes
#035Sigmoid: the S-shaped curve that turns any score into a probability
#036Logits: the raw bet a model places before it gives you a percentage
#037Cross-entropy vs MSE: why squared error stalls on its worst mistakes
#038Entropy: measuring surprise, and the floor no blind guess can beat
Nội dung được viết với sự hỗ trợ của AI từ chương 4 trong khóa học miễn phí của chúng tôi.