Notes

Micro Average

When you evaluate a classifier with more than two classes, you quickly run into a question: do you want each class to “get a vote,” or do you want each individual prediction to “get a vote”? Micro average is the second idea—it treats every single example equally, no matter which class it belongs to.

What micro averaging does

Micro averaging aggregates the raw counts of true positives, false positives, and false negatives across all classes first, and only then computes a metric such as precision, recall, or F1. Concretely, for multi-class or multi-label classification:

  • Micro-precision = (sum of TP over classes) / (sum of TP + sum of FP)
  • Micro-recall = (sum of TP over classes) / (sum of TP + sum of FN)
  • Micro-F1 is computed from micro-precision and micro-recall.

This makes micro-averaged scores heavily influenced by the most frequent classes, because those classes contribute the most total decisions.

Why it matters for imbalanced data

In imbalanced settings (fraud detection, rare disease diagnosis, churn prediction with a tiny “churn” class), a strong micro-F1 can look reassuring even if the model performs poorly on rare classes—because the majority class dominates the pooled counts. Micro averaging is still useful when your real goal is “overall correctness across all individual predictions,” but it can hide minority-class failures that matter operationally.

How you’ll see it in practice

  • In scikit-learn: f1_score(y_true, y_pred, average="micro") and precision_recall_fscore_support(..., average="micro").
  • In multi-label problems (e.g., tagging support tickets), micro averaging measures performance across all label assignments, not per-label fairness.

Micro average is an aggregation method for multi-class or multi-label evaluation that computes a metric (e.g., precision, recall, F1) from the global totals of true positives, false positives, and false negatives across all classes, rather than averaging per-class scores. It matters because it weights each individual prediction equally, giving a stable overall performance summary but allowing frequent classes to dominate results under class imbalance.

Imagine you’re judging a school by counting every test question answered correctly across all students, instead of averaging each student’s score. Big classes naturally influence the result more because they contribute more questions.

In AI classification, micro average works the same way. When you measure things like precision or recall across multiple classes (for example: spam, promotions, and personal email), micro averaging pools all the model’s decisions together first, then computes one overall score. That means common classes (like “not spam”) can dominate the number, while rare but important classes (like fraud) may have less impact. It’s useful when you care about total correct decisions across everything.