Clear thinking about intelligent tools.

Macro and Micro Averages Can Tell Different Stories About an AI Classifier

Data analyst reviewing a generic three-class classification chart on a screen, notebook beside keyboard.
AI-generated photographic illustration; not documentary photography.

A classifier can perform well on the most common category and poorly on a rare one. A single average may hide that difference, depending on how the average is calculated. Before comparing model scores, read the averaging method alongside the metric name.

The scikit-learn evaluation documentation distinguishes macro averaging, which averages per-class scores without weighting by class size, from micro averaging, which pools the underlying counts before calculating the metric.

A small example makes the difference visible

Imagine a single-label test set containing 90 examples of class A and 10 of class B. A model predicts A for every example. Its recall for A is 100%, while recall for B is 0%. Macro recall is therefore 50%: each class contributes equally to that average.

Micro recall across both classes is 90%, because 90 of the 100 true examples receive the correct class. These are calculations from the same predictions, not conflicting test results. They emphasise different aspects of performance.

Do not transfer the arithmetic mechanically to every metric or task. F1 combines precision and recall, and multilabel evaluation has additional choices. State the exact metric, label set and averaging convention.

Choose the question before choosing the headline

If missing a rare category matters, inspect that category’s results directly. A macro score can draw attention to uneven performance, but even it compresses several outcomes into one number. Include support counts and the confusion matrix where they help readers understand the errors.

For a model comparison, hold the evaluation dataset and definitions constant. Record whether labels were omitted, whether any class had no predictions and how undefined values were handled. A useful report makes the score reproducible and its limitations visible, rather than selecting whichever average makes the model look strongest.