How do you evaluate a multi-label classifier where an item can have zero, one, or several labels?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
How do you evaluate a multi-label classifier where an item can have zero, one, or several labels?
```hint Decide what you average over
A multi-label prediction is a grid of items by labels. Ask what changes when you score each row first, each column first, or all cells pooled together.
```
```hint Separate scores from decisions
The model outputs a score per label, and a threshold turns it into a set. Consider metrics that judge each of those steps on its own.
```
### What a Strong Answer Covers
- The main families of multi-label metrics and what each one rewards
- How micro and macro averaging differ and which labels each one favors
- Why a single number such as subset accuracy or Hamming loss is misleading on its own
- Practical issues: items with no labels, per-label thresholds, splitting data with rare label combinations, and co-occurrence errors
### Follow-up Questions
- Your Hamming loss is 0.01 but users say predictions are poor. What could explain the gap, and what would you check?
- How would you choose decision thresholds per label, and what data would you tune them on?
- Some labels never appear in the test set. How does that affect macro-averaged metrics?
- When would you predict a fixed number of labels per item instead of thresholding, and how would you pick that number?
Overview: Asks how to evaluate a classifier where each item can have zero, one or many labels. Tests example-based, label-based and ranking metrics, micro versus macro averaging, per-label thresholds, empty label sets and stratified splits for rare label combinations.