1. Precision Recap (Binary Case)
- Precision = Of all predicted positives, how many are actually positive?
$Precision = \frac{TP}{TP + FP}$
Where:
- TP = True Positives
- FP = False Positives
2. Multiclass Extension
For K classes, there are two main strategies: macro vs micro.
- Macro Precision: Compute precision per class (OvR), then average them equally.
- Micro Precision: Pool all classes together and compute precision globally.
3. Definition of Micro Precision
$Precision_{micro} = \frac{\sum_{i=1}^{K} TP_i}{\sum_{i=1}^{K} (TP_i + FP_i)}$
- Instead of averaging per-class scores, we sum up counts across classes first, then compute precision.
- Equivalent to treating the multiclass problem as one big binary problem: “correct vs incorrect”.
4. Key Characteristics
- Micro Precision = Micro Recall = Micro F1 in multiclass classification (because they’re all based on the same global TP, FP, FN counts).
- Dominated by majority classes: large classes contribute more to the total TP and FP.
- More useful when class imbalance exists and you want to measure overall system performance, not per-class fairness.
5. Example
Suppose we have 3 classes (A, B, C).
Confusion matrix results:
- Class A: TP = 40, FP = 10
- Class B: TP = 30, FP = 20
- Class C: TP = 10, FP = 20
Macro Precision:
- Precision(A) = 40 / (40+10) = 0.80
- Precision(B) = 30 / (30+20) = 0.60
- Precision(C) = 10 / (10+20) = 0.33
- Macro Precision = (0.80 + 0.60 + 0.33) / 3 = 0.58
Micro Precision:
$\frac{40+30+10}{(40+10)+(30+20)+(10+20)} = \frac{80}{130} \approx 0.615$
Notice: Micro Precision (0.615) is closer to the large classes’ contribution.
Summary
- Micro Precision = global precision across all classes.
- Counts TP and FP across classes before computing precision.
- Favours large classes, good for overall system evaluation.
- Macro Precision treats all classes equally.
