📏  Accuracy

Accuracy#

The fraction of predictions that are correct.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

Accuracy is the simplest classification metric — the fraction of predictions that are correct:

\[\text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN}.\]

It answers what share did the model get right?

The imbalance trap#

Accuracy is misleading on imbalanced data — if 99% of cases are negative, a model that predicts “negative” for everything scores 99% while catching zero positives. That false sense of security is why fraud, disease and anomaly tasks report precision / recall, AUC or F1 instead.

When it’s fine#

Accuracy is a reasonable headline when classes are roughly balanced and every error costs about the same. Otherwise it hides which errors happen — a confusion matrix and threshold-aware metrics tell the real story.


Theme: Classification & Averaging Metrics  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Accuracy (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate