← Measures

Accuracy

The share of predictions a model gets exactly right. The simplest classification metric, and the easiest to misread.

At a glance

Full name Classification accuracy
What it measures The proportion of a model’s predictions that exactly match the correct label
Formula Correct predictions ÷ total predictions
Typical range 0 to 1, usually reported as a percentage
Used for Classification tasks: spam filtering, image labelling, intent detection, content moderation
Best used for A quick first read, on roughly balanced classes
Pair with Precision, recall and F1, especially whenever one class is rarer than the others

Accuracy is the first number anyone reaches for, and it is the metric most likely to mislead. It asks one question: out of everything the model labelled, how much did it get right? It says nothing about which kind of mistake it made, and that silence is where accuracy goes wrong.

What it is and how it’s computed

For a set of predictions, count how many match the true label, and divide by the total. A model that classifies 950 of 1,000 emails correctly has 95% accuracy. For more than two classes, the logic is the same: every prediction either matches the true label or it does not, and accuracy is simply the hit rate across all of them.

A worked example

Consider a spam filter tested on 1,000 emails, of which 980 are genuine and 20 are spam. A model that predicts “not spam” for every single email, never looking at the content at all, scores 98% accuracy. It also catches zero spam. The number looks excellent and the model is useless, because the classes are wildly imbalanced and accuracy cannot see that. This is the single most common way the metric gets misused in practice, and it is why nearly every serious evaluation reports precision and recall alongside it.

Where it matters

Accuracy is the standard first metric for image classification (ImageNet top-1 and top-5 accuracy), for simple intent or sentiment classifiers, and anywhere the classes occur in roughly similar numbers. It is also the metric most dashboards default to, because it is the easiest one to explain to a non-technical audience.

Strengths

It is simple to compute, simple to explain, and comparable across models without any extra choices to make. On balanced data, with roughly equal costs for each kind of error, it is a perfectly reasonable single number.

Limitations, and the things that go wrong

Accuracy treats every error as equally bad, when in most real systems the errors are not equally bad. A medical screening tool that misses a disease (a false negative) and one that raises a false alarm (a false positive) cost very different amounts, and accuracy blends them into one number that hides which kind the model is making. On imbalanced data, a model can score very high while being useless for the minority class, exactly as in the spam example above. And accuracy says nothing about how confident the model was, only whether the top prediction happened to be right.

When I would use it, and what to pair it with

I use accuracy as a sanity check and nothing more: a number to glance at before looking at the metrics that actually describe the behaviour. The moment the classes are imbalanced, or the two kinds of error have different costs, move to precision, recall and F1, and look at the confusion matrix directly rather than trusting a single aggregate.