← Lessons

quiz vs the machine

Gold1430

Machine Learning

Multiclass Averaging Macro Vs Micro

Two ways to roll per class scores into one, with opposite biases.

5 min read · core · beat Gold to climb

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.

Check yourself

Answer to earn rating on the learn ladder.

1. Macro averaging gives equal weight to what?

2. Which averaging tends to track overall accuracy most closely?