Interview practice question
Classifier ignores the rare class
Machine Learning · ML Frameworks · Beginner
Your scikit-learn classifier predicts the majority class for almost everything in an imbalanced dataset. What do you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Use appropriate metrics (precision, recall, PR-AUC).
- class_weight="balanced" or sample weights.
- Resampling (imbalanced-learn).
- Tune decision threshold.
- Stratified splits.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.