One score from many classes
With more than two classes you get a precision and recall per class. To report a single number you must average them, and the choice of averaging changes the story.
Macro averaging
Macro averaging computes the metric for each class separately, then takes a plain average.
- Every class counts equally regardless of size.
- A tiny rare class influences the score as much as a huge common one.
- This is the right choice when minority classes matter.
Micro averaging
Micro averaging pools the counts across all classes first, then computes the metric once.
- Large classes dominate because they contribute most of the counts.
- The result tracks overall accuracy more closely.
- This is the right choice when every individual prediction matters equally.
A third option, weighted averaging, sits between them by weighting each class by its frequency.
Key idea
Macro averaging treats every class equally and spotlights rare classes, while micro averaging pools counts so large classes dominate. Pick the one that matches what you care about.