Macro Averaging#
Computing a metric per class then averaging them equally.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Macro averaging computes the metric separately for each class (one-vs-rest), then takes the unweighted arithmetic mean. Every class counts the same, no matter how many samples it has:
Its behavior#
Because each class contributes equally, macro averaging punishes ignoring minorities — a model that aces the majority but fails a rare class gets a low macro score. That makes it sensitive to rare-class performance and a natural fairness-oriented headline.
When to use it#
Use macro averaging when all classes matter equally, especially on imbalanced data where you don’t want the majority to drown out the rest. It can, however, look pessimistic if some tiny classes are inherently hard.
Theme: Classification & Averaging Metrics · All terminology
Hint
Mind map — connected ideas
Micro Averaging · Weighted Averaging · Macro AUC · One-vs-Rest (OvR) · F1-score · Multiclass Classification
Hint
More in Classification & Averaging Metrics
Accuracy · AUC (Area Under the Curve) · Average Precision (AP) · Binary Classification · Classification Probability · Discriminatory Power · F1-score · Gini Coefficient · Harmonic Mean · Log Loss (also called Logarithmic Loss or Cross-Entropy Loss) · Macro AUC · Macro AUROC (Macro-Averaged AUROC) · Macro F1 · Macro Precision
See also
Source article Adapted (context, re-expressed) in our own words from: Macro Averaging (insightful-data-lab.com).