A dataset has severe label imbalance and you train with standard cross-entropy. Which change most effectively targets minority-class recall without greatly inflating false positives?
Answer
Use class-weighted loss or focal loss and validate using PR-AUC or F-beta suited to recall
Explanation
Class-weighting/focal loss adjusts the learning signal toward minority errors. Evaluating with PR-focused metrics aligns model selection with the recall–precision tradeoff.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
Suppose a time-series model’s offline metrics look strong, but real-time monitoring shows performance degradation after a regime change. Which diagnostic is the most appropriate first step?
View question →
The system uses a prompt template that includes retrieved snippets. The team notices answers sometimes contradict the highest-ranked snippet. What is the most likely root cause and most effective fix?
View question →
A classifier’s probability outputs are well-calibrated on validation but poorly calibrated in production due to a covariate shift. Which action is most appropriate?
View question →
A team considers replacing a heuristic feature pipeline with embeddings for semantic search and classification. The team wants to reduce hand-crafted rules while maintaining stable behavior across diverse queries. Which design choice best supports robustness?
View question →
A model is used for document classification, and you must minimize bias toward a protected group while preserving overall accuracy. Which strategy best matches that goal under typical fairness constraints?
View question →
Which scenario best justifies using a more expressive model (e.g., a transformer variant) rather than improving features for a linear model?
View question →