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.
Where this lab comes from
Multiclass and Multilabel Metrics: Micro, Macro, Weighted, and the Difference That MattersHow 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
- Precision, recall and the threshold — Edit the four counts, or drag a threshold and trace the PR and ROC curves.
- IoU and Dice, by dragging boxes — Two draggable boxes; intersection, union and both scores update live.
- When one photo carries several labels — Toggle predicted tags and watch subset accuracy punish you.