Skip to content

Accuracy

The share of predictions a classifier gets right. Simple and intuitive, but misleading when one class is much rarer than the other.

Domain 01
Foundations
Role · kind
Evaluating and testingMetric
Level
Beginner

If you answer 9 out of 10 quiz questions correctly, your accuracy is 90%.

Where it fits

+All relationships as a list

See it on the full map

How it works

Accuracy counts how often a classifier is right:

accuracy=correct predictionsall predictions\text{accuracy} = \frac{\text{correct predictions}}{\text{all predictions}}

It is the first number everyone reports, and on balanced problems it is fine. The trouble starts when one class is rare. In fraud detection, disease screening or defect spotting, the “boring” class dominates, so a model can score very high accuracy by never predicting the interesting class.

In those cases look at the full picture: how many real positives were found (recall), how many alarms were real (precision), and how the trade-off moves as you change the decision threshold (ROC curve). These will get their own pages in the atlas.

Everyday use cases

  • Case 01

    Digit recognition

    On a balanced dataset of handwritten digits, accuracy is a perfectly good headline number.

  • Case 02

    The fraud trap

    If 0.1% of transactions are fraud, a model that says "never fraud" is 99.9% accurate and completely useless.

Strengths, weaknesses and when to use it

Strengths

  • Easy to explain to anyone.

Weaknesses

  • Hides how errors are distributed across classes.
  • Misleading with imbalanced classes.

When to use itFor classification with roughly balanced classes, where all mistakes cost about the same.

Check yourself

  1. Q01

    1% of patients have a disease. A model always predicts "healthy". What is its accuracy?

    Show answer

    C: 99% It is right for the 99% of healthy patients, while catching zero sick ones.

Go deeper