ML0013 Accuracy

What is accuracy?

Answer

Accuracy is a metric that evaluates a classification model as the ratio of correct predictions to the total number of predictions: if a model classifies 99 of 100 samples correctly, its accuracy is 99%. It is intuitive and widely used because it directly answers “how often is the model right?” The four outcomes behind it are: true positives (positive correctly predicted), true negatives (negative correctly predicted), false positives (negative predicted as positive), and false negatives (positive predicted as negative). The important caveat: accuracy alone can be misleading on imbalanced data: a model that labels every patient “healthy” scores 99% on a dataset with 1% disease prevalence while being clinically useless. In such cases, precision, recall, and the F1 score give a truer picture.

(1) Definition: Correct predictions divided by all predictions, simple and intuitive.
(2) When It Works: Roughly balanced classes and symmetric error costs.
(3) The Accuracy Paradox: On skewed data, a trivial “always predict the majority” model scores high accuracy with zero real skill.

Grid of 100 samples with 90 majority class showing the trivial 90 percent accuracy paradox

Figure 1: The accuracy paradox: with 90 negatives and 10 positives, predicting “negative” for everything yields 90% accuracy while catching zero positives.

Mathematical Formulation:
\text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN}

Where:

  • TP and TN are the counts of correct positive and negative predictions: the numerator counts everything the model got right.
  • FP and FN are the false alarm and miss counts; the denominator is simply the total number of samples.
  • Because TN dominates on imbalanced data, high accuracy can hide a model that never identifies the minority class at all.

Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *