How do you use a multi-class confusion matrix for per-class error analysis and finding systematic confusions?

Quick Overview

Asks how to use a multi-class confusion matrix to break errors down by class and find the pairs a model systematically confuses. Tests row and column normalization, ranking off-diagonal cells, reading symmetric and sink-class patterns, and turning error analysis into targeted fixes.

How do you use a multi-class confusion matrix for per-class error analysis and finding systematic confusions?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How do you use a multi-class confusion matrix to perform per-class error analysis and identify which classes the model systematically confuses? Cover how you read the matrix, how you find the confusions that matter, and what you do once you have found them. ```hint Normalize first Raw counts mostly reflect class prevalence. Work out which normalization turns the diagonal into recall, which turns it into precision, and what you still need the raw counts for. ``` ```hint Patterns off the diagonal Once the diagonal is set aside, compare a confusion that runs both ways between two classes with a single predicted class that collects errors from many true classes. They usually have different causes. ``` ### What a Strong Answer Covers - How to read the matrix, the two normalizations and what each diagonal means, and why raw counts still matter. - A systematic way to rank off-diagonal confusions by rate and by impact. - How symmetric and asymmetric confusion patterns point to different causes. - Inspecting real examples from the top cells and sorting the errors into causes. - Targeted fixes, and how to confirm that a fix did not just move the errors elsewhere. ### Follow-up Questions - With 500 classes the matrix is unreadable as a heatmap. How would you find the systematic confusions? - How would you tell label noise apart from two classes that are truly ambiguous? - How would you implement and tune per-class thresholds for a softmax classifier? - How would you check whether a drop in one confusion cell between two model versions is real and not noise?

Overview: Asks how to use a multi-class confusion matrix to break errors down by class and find the pairs a model systematically confuses. Tests row and column normalization, ranking off-diagonal cells, reading symmetric and sink-class patterns, and turning error analysis into targeted fixes.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

How do you use a multi-class confusion matrix to perform per-class error analysis and identify which classes the model systematically confuses? Cover how you read the matrix, how you find the confusions that matter, and what you do once you have found them.

What a Strong Answer Covers Guidance

  • How to read the matrix, the two normalizations and what each diagonal means, and why raw counts still matter.
  • A systematic way to rank off-diagonal confusions by rate and by impact.
  • How symmetric and asymmetric confusion patterns point to different causes.
  • Inspecting real examples from the top cells and sorting the errors into causes.
  • Targeted fixes, and how to confirm that a fix did not just move the errors elsewhere.

Follow-up Questions Guidance

  • With 500 classes the matrix is unreadable as a heatmap. How would you find the systematic confusions?
  • How would you tell label noise apart from two classes that are truly ambiguous?
  • How would you implement and tune per-class thresholds for a softmax classifier?
  • How would you check whether a drop in one confusion cell between two model versions is real and not noise?