When would you prefer focal loss over class-weighted cross-entropy for an imbalanced classification problem?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Asks when focal loss is a better choice than class-weighted cross-entropy for imbalanced classification. Tests how each loss rescales examples, the role of easy negatives and hard examples, sensitivity to label noise, tuning of alpha and gamma, and calibration of the outputs.