Macro, micro and weighted, side by side

Rows are truth, columns are prediction, every cell is editable. Per-class precision, recall and F1 update along with the macro, micro and weighted summaries, which is where averaging choices stop being a detail.

Try this

Zero out the diagonal of the rarest class. Macro-F1 collapses; micro and accuracy barely notice.

Confusion matrix: rows = truth, columns = prediction. Edit any cell.
Per-class F1 (bars) vs the macro / micro / weighted averages (lines).

Where this lab comes from

Multiclass and Multilabel Metrics: Micro, Macro, Weighted, and the Difference That Matters

How precision/recall/F1 scale past two classes: one-vs-rest, and the micro/macro/weighted averaging that decides whether rare classes count. Plus multilabel-specific metrics: subset accuracy, Hamming loss, and top-k, all on one running shelter-camera example, with scikit-learn.

More in metrics