AI Glossary / Retrieval and knowledge systems / Intermediate
Microaveraging
Definition
Microaveraging combines evaluation evidence across classes or labels before calculating the final metric. For precision, recall and F1, it pools true positives, false positives and false negatives, then applies the metric formula to those totals. It summarizes performance over the combined label decisions rather than giving each class an equal vote.
What it means
A model may handle many more examples of one category than another. Microaveraging reflects the resulting volume of correct and incorrect decisions. This makes it useful for assessing aggregate behavior, but frequent labels can strongly influence the result.
The averaging method answers a different question from macroaveraging, which calculates a score for each class and averages those scores equally. Neither is universally better. Their suitability depends on whether the evaluation prioritizes overall decision volume, equal attention across classes or another explicit objective.
How it works
For each included label, count true positives, false positives and false negatives under a consistent evaluation rule. Sum each count across labels. Micro precision is total true positives divided by total predicted positives. Micro recall is total true positives divided by total actual positives.
Micro F1 can be calculated directly as twice the pooled true positives divided by twice the pooled true positives plus pooled false positives and false negatives. It is not an arithmetic average of per-class F1 values.
For ordinary single-label classification with every class included, micro precision, recall and F1 equal accuracy. In multilabel tasks, or when only a subset of classes is evaluated, that equality does not generally hold. The label set, thresholds and zero-division handling must be documented.
Three practical examples
1. A multilabel document-tagging system uses micro F1 to summarize the total balance of correctly assigned, unnecessary and missed labels.
2. An information-extraction benchmark pools predicted and reference entity counts across selected entity types to report an aggregate score under its matching rules.
3. A classifier evaluation compares micro and macro results to determine whether strong aggregate performance is masking weaknesses in infrequent categories.
Think of it this way
Think of combining all eligible decisions into one shared ledger before calculating the success measure. A busy category contributes more entries to that ledger than a quiet category. This shows the overall pattern of decisions, but it can make the experience of a small category difficult to see without a separate breakdown.
Worked example
Consider an invented multilabel test with two labels. For label A, the system has eight true positives, two false positives and two false negatives. For label B, it has one true positive, one false positive and three false negatives.
Pooling gives nine true positives, three false positives and five false negatives. Micro precision is 9/(9 + 3) = 9/12 = 0.75. Micro recall is 9/(9 + 5) = 9/14, approximately 0.6429. Micro F1 is 18/(18 + 3 + 5) = 18/26, approximately 0.6923.
For comparison, A's F1 is 16/(16 + 2 + 2) = 0.8, while B's is 2/(2 + 1 + 3) = 1/3. Their macro F1 is (0.8 + 1/3)/2, approximately 0.5667. The lower macro value makes the weak B performance more prominent.
This example permits multiple labels per item, so the counts need not behave like a single-label confusion matrix. It does not measure exact-match accuracy for entire label sets, and its pooled score does not reveal which individual items received several mistakes.
Illustrative case study
Fictional case: Cedar Tagging reports a strong micro score because its model performs well on several frequent labels. Editors still spend substantial time correcting a rare specialist label that appears in important documents.
The team keeps the micro score for aggregate monitoring but adds per-label results, macro F1 and a review of document-level failures. It also records the decision thresholds used in each evaluation. This lets the team see whether a new model improves overall labeling volume while preserving acceptable performance on the smaller specialist workload.
Common misconceptions and mistakes
Microaveraging does not give every class equal importance. It pools counts, so the relevant decision volume influences the result. It is not generally identical to a support-weighted average of per-class F1, because F1 is nonlinear.
The statement that micro F1 equals accuracy needs the single-label, all-classes conditions. In multilabel classification, exact-match accuracy asks whether an item's entire label set is correct, which is a different question. Excluding a background class can also change the interpretation. Do not compare scores from different label sets or matching rules as if the averaging convention alone made them equivalent.
Business use
Use microaveraging when aggregate label decisions are central to the task, and accompany it with breakdowns that reveal concentrated failures. Define which labels count, how predictions are thresholded and what constitutes a correct match. Preserve those choices across model comparisons.
Connect the metric with workload and error consequences. A small improvement in a common class can outweigh a serious decline in a rare class within the pooled score. If that trade-off is unacceptable, add explicit per-class requirements or cost-based evaluation rather than expecting microaveraging to enforce them.
People also ask
Is micro F1 an average of F1 scores?
No. It is calculated from pooled counts.
Does microaveraging always equal accuracy?
No. The equality holds for ordinary single-label classification when all classes are included, but not generally for multilabel or restricted-label evaluation.
Why can micro F1 exceed macro F1?
The better-performing labels may contribute more decisions to the pooled calculation, while macro F1 gives weak small labels equal weight.
Check your understanding
A pooled evaluation has 12 true positives, three false positives and five false negatives. What is micro F1?
Answer: 24/(24 + 3 + 5) = 24/32 = 0.75. The calculation uses the pooled counts directly rather than averaging any per-label scores.
Related terms
- Macroaveraging
- weighted averaging
- micro precision
- micro recall
- F1 score
- multilabel classification
- support and exact-match accuracy
Learn next
compute micro and macro F1 from the same label counts. Add many correct predictions for a common label and observe how each changes. Then compare both with exact-match accuracy on a small multilabel dataset.
More in Retrieval and knowledge systems
- Low-dimensional embedding - A low-dimensional embedding represents an item using relatively few numerical coordinates while aiming to retain relationships useful for a task.
- Match rating approach - The Match rating approach (MRA) is a rule-based method for comparing names through compact phonetic encodings and a rating procedure.
- Metaphone - Metaphone is a phonetic encoding algorithm that converts a word into a compact code using spelling rules intended to approximate aspects of its pronunciation.
- Moving average - A moving average is an average recalculated over a window that moves through a sequence of observations.
- Music alignment - Music alignment is the process of identifying corresponding musical positions across different representations or performances of a work.
- Next word index - A next word index, often written nextword index in information-retrieval research, organizes words by the words that immediately follow them in documents.
Sources
Primary sources: scikit-learn, precision_recall_fscore_support API, micro averaging and label selection: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_fscore_support.html
scikit-learn, Model evaluation guide, multiclass and multilabel metric definitions: https://scikit-learn.org/stable/modules/model_evaluation.html
Previous: Micro-thread (multi-core) Next: Microparallelism