1
$\begingroup$

I am reading about evaluation metrics, and it seems that micro scores are more useful. But I was wondering about scenarios where macro F1 score is greater than micro F1 score, and if this is at all possible.

$\endgroup$
1
$\begingroup$

Yes, it can.

Example with Precision

  • Class A: 1 TP and 1 FP
  • Class B: 10 TP and 90 FP
  • Class C: 1 TP and 1 FP
  • Class D: 1 TP and 1 FP

Here, $P_A = P_C = P_D = 0.5$, $P_B = 0.1$

Macro-F1 is: $P_M = \frac{P_A + P_B + P_C + P_D}{4} = 0.4 $, while micro-F1 is: $P_m=\frac{TP_A+TP_B+TP_C+TP_D}{TP_A+TP_B+TP_C+TP_D+FP_A+FP_B+FP_D+FP_D} = 0.123$, hence $P_M > P_m$.

$\endgroup$
  • $\begingroup$ It seems like the reason behind this is that the macro calculation doesn't take into account the class imbalance and thus weights the performance of the classifier on minority classes too heavily. $\endgroup$ – Wes Feb 19 '19 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy