In f1_score with average='macro', how are the per-class scores combined into one number?
Correct answer
D. As an unweighted mean, so every class counts equally whatever its size
25 views
D. As an unweighted mean, so every class counts equally whatever its size
25 views
average='macro' computes the metric for each class independently and takes the unweighted mean, giving a rare class the same influence as a frequent one. The weighted option weights each class by its support, while micro pools all decisions into one global count, which equals accuracy in single-label classification. Macro scores expose poor performance on minority classes that accuracy hides.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is D? Ask here and get an explanation.