Multiclass F1 comes in two flavours that quietly disagree with each other the moment classes are imbalanced, and the most common bug is averaging the wrong things before combining them.
Write multiclass_f1(confusion). Given a (C, C) confusion matrix — rows are true classes, columns are predicted classes, exactly the convention a confusion matrix always uses — return (macro_f1, micro_f1).
You have read the opening. The rest is free with a Bezen account, and no card is needed.
Behind the sign-in