Accuracy
Accuracy is the fraction of a classifier's correct predictions, but it misleads on imbalanced classes —hence it is paired with precision, recall, F1 and MCC.
Accuracy is the most intuitive metric for evaluating a classifier: it measures the fraction of predictions the model gets right out of the total. In a classification task you add up the hits —the true positives (TP) and true negatives (TN)— and divide by every prediction made. In plain text: Accuracy = (TP + TN) / (TP + TN + FP + FN), where FP are false positives and FN false negatives. The result, between 0 and 1 or given as a percentage, answers a simple question: what share of cases did the model label correctly? Reference material such as Google for Developers' Machine Learning Crash Course and the scikit-learn library define it in exactly these terms.
How it is calculated
Every evaluation of a classifier starts from the confusion matrix, the table that cross-tabulates true labels against predicted ones and sorts each case into one of four cells: TP, TN, FP and FN. Accuracy collapses that table into a single number: the diagonal hits divided by the total. On a balanced binary problem —say, half legitimate emails and half spam— it is an honest, easy-to-communicate measure. It is worth not confusing this sense with the one used in metrology: under the ISO 5725 standard, «accuracy» combines trueness —closeness to the real value— and «precision» —the reproducibility of the measurements—, two separate ideas. In machine learning, «accuracy» carries the meaning above: the proportion of correct predictions.
Why it misleads with imbalanced classes
The trouble appears when one class dwarfs the other. If 99% of transactions are legitimate and only 1% are fraud, a model that always predicts «legitimate» is right 99% of the time without catching a single fraud. Its accuracy is sky-high and its usefulness is nil. This is known as the accuracy paradox: the sheer volume of true negatives drowns out the few positives that actually matter. Google for Developers illustrates it with a disease found in 10 of every million patients, where a model can post 99.98% accuracy while missing 40% of the sick. The number reassures, but it hides the failure.
What to use instead
That is why accuracy rarely travels alone. Precision measures what fraction of the alarms were real; recall measures what fraction of the actual positives were caught; and F1 combines the two as their harmonic mean, useful precisely when classes are imbalanced. For a verdict that weighs all four cells of the matrix at once, the Matthews correlation coefficient (MCC) scores high only when the model succeeds on positives and negatives alike; Davide Chicco and Giuseppe Jurman argued in 2020 that it is more informative than F1 and accuracy in binary classification. Accuracy remains a good first glance, never the final word.
Pieces using this term
- How to Read an AI Demo Without Mistaking It for Proof (2026-07-27)
- AI Reaches Luxury: How to Tell a Brand Demonstration From a Brand Transformation (2026-07-27)
- IVI RMA eyes Spain for AI and robotics in IVF: what is proven and what is not (2026-07-27)
- How to verify a chatbot claim before you use it (2026-07-26)
- When several AI models agree, they may still be wrong (2026-07-26)
- Memora proposes a different kind of memory for AI agents (2026-07-25)
- A solver can perfectly solve the wrong problem (2026-07-25)
- How to read a PyTorch attention trace before optimizing it (2026-07-24)
This article was produced with artificial intelligence under human editorial oversight.