The Evaluation article closed with a promise to explain the most familiar metric of all, and exactly where its simplicity breaks down. That metric is accuracy — the number everyone reaches for first, and the number this whole phase will spend the next few articles teaching you not to trust blindly.
The simple definition
Accuracy is the fraction of a model’s predictions that were correct. Out of 100 predictions, if 90 matched the actual Ground Truth, the model’s accuracy is 90%. It’s calculated with a formula about as simple as evaluation metrics get:
accuracy = number of correct predictions / total number of predictions
Why accuracy is the natural first instinct
Accuracy is intuitive, easy to explain to anyone regardless of technical background, and directly answers the question most people ask first: “how often is this model right?” For many tasks — predicting a coin flip, classifying balanced categories of roughly equal size, or any situation where every kind of mistake carries roughly the same real-world cost — accuracy genuinely is a fair, sufficient summary of performance, exactly as the Evaluation article’s coin-flip example illustrated.
flowchart LR
A[100 predictions made] --> B[90 correct, 10 wrong]
B --> C[Accuracy = 90/100 = 90%]
Where accuracy becomes genuinely dangerous
Recall the exact trap first flagged in the Baseline article: if 90% of emails in a dataset genuinely aren’t spam, a model that does absolutely nothing intelligent — one that simply predicts “not spam” for every single email, regardless of content — still achieves 90% accuracy. That number sounds impressive in isolation and is, in reality, completely worthless; the model has learned nothing at all. This situation, where one category vastly outnumbers another, is called class imbalance, and it’s one of the most common, consequential traps in real-world Machine Learning evaluation.
flowchart LR
A[Dataset: 90% not-spam, 10% spam] --> B[Model always predicts 'not spam']
B --> C[90% accuracy]
C --> D[But the model never detects a single real spam email]
ANALOGY vs. TECHNICAL REALITY
Analogy: Think of a smoke detector that never goes off, ever. In a building where fires are extremely rare — say, one real fire out of every thousand days — that broken, silent detector is “accurate” 99.9% of the time, since it correctly does nothing on the 999 fire-free days. But its one actual job, detecting the rare, critical event, is something it fails at completely.
Where this breaks down: A silent smoke detector’s uselessness is obvious to any human immediately, since its complete failure to ever activate is instantly visible. A model’s equivalent failure — always predicting the majority class — can be genuinely non-obvious from the accuracy number alone, buried inside a seemingly impressive 90% or 99% figure, which is exactly why relying on accuracy alone, without checking for class imbalance, is such a persistent and easy-to-miss trap.
When accuracy is fine, and when it genuinely isn’t
It’s worth being precise about this rather than dismissing accuracy entirely — it has a real, legitimate place, just not everywhere:
- Accuracy works well when the classes being predicted are roughly balanced, and when different types of mistakes are roughly equally costly.
- Accuracy becomes misleading when classes are imbalanced (rare fraud, rare disease, rare defect), or when different mistakes have very different real-world costs — exactly the scenario the Evaluation article’s medical-diagnosis-versus-spam-filter comparison highlighted.
Calculate accuracy from one shared example
A screening model checks 100 people:
True positives (TP) = 18 sick people correctly flagged
True negatives (TN) = 72 healthy people correctly cleared
False positives (FP) = 8 healthy people incorrectly flagged
False negatives (FN) = 2 sick people incorrectly cleared
Total = 100 people
Accuracy counts both kinds of correct prediction:
accuracy = (TP + TN) ÷ (TP + TN + FP + FN)
= (18 + 72) ÷ 100
= 90 ÷ 100
= 90%
This tells us 90 of 100 predictions were correct. It does not tell us which ten mistakes occurred. For that, we need the Confusion Matrix and its derived metrics.
Accuracy has a hidden dependency: the decision threshold
A classification model often produces a score such as 0.73, not the word “positive.” A threshold converts that score into a class:
score ≥ 0.50 → predict positive
score < 0.50 → predict negative
Changing the threshold changes the confusion matrix and therefore changes accuracy, precision, and recall. Metrics should always be interpreted with the chosen threshold and real-world error costs in mind.
A concrete example, layered
For a simple beginner example: a model predicting whether a coin lands heads or tails, evaluated across 1,000 fair coin flips, with 850 correct predictions, has a clean, meaningful accuracy of 85% — a genuinely fair summary, since heads and tails are equally common and equally “costly” to mispredict. For a production example: a model built to detect a rare disease present in only 1% of patients tested could achieve 99% accuracy by simply predicting “no disease” for every single patient — a number that sounds outstanding and is, for the model’s actual real-world job of catching sick patients, completely useless, since it would never flag a single true case. This exact scenario — genuinely common in real medical and fraud-detection applications — is precisely why the next two articles, Precision and Recall, exist: to measure something accuracy alone fundamentally cannot capture.
Real model example: GPT-4’s benchmark accuracy
The GPT-4 Technical Report reports 86.4% on MMLU, a multiple-choice benchmark spanning many subjects, under the report’s evaluation setup. That means about 86 of every 100 scored answers were correct overall.
But the report also breaks performance down by subject. The overall accuracy can hide areas that are stronger or weaker than 86.4%. This is the same lesson as the medical example: an overall average is useful, but important slices must still be inspected.
Overall accuracy → useful summary
Accuracy by subject → reveals where errors are concentrated
Individual examples → reveal why those errors happened
Common misconception
The most important misconception to correct here, because it’s genuinely one of the most common mistakes in applied Machine Learning: assuming a high accuracy score automatically means a good model. As every example in this article has shown, high accuracy can coexist with a model that’s completely failing at its actual, real-world purpose — particularly whenever the categories being predicted are imbalanced. Accuracy should never be trusted as the sole evaluation metric for a classification task without first checking whether the classes are balanced and whether all mistake types are genuinely equally costly.
Where this fits in what comes next
You now understand accuracy’s real value and its real, well-documented blind spot. The next article, Confusion Matrix, introduces the tool that actually reveals what accuracy hides — breaking a model’s predictions down into the specific types of correct and incorrect outcomes, rather than collapsing them all into one undifferentiated number.
In one sentence
Accuracy is the simple, intuitive fraction of correct predictions, genuinely useful for balanced, equal-cost tasks — but dangerously misleading on imbalanced data, where a model can score impressively high while completely failing at the one job that actually matters.
Related Terms
- Author
- TechByteByByte Editorial Team
- Reviewed by
- TechByteByByte Admin
- Published
- Last reviewed