Machine Learning Fundamentals interview question

How do you handle imbalanced classes?

How you'd do it Asked in Machine Learning Engineer interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

First pick metrics that reflect the imbalance (precision, recall, PR-AUC) and tune the decision threshold. Then, if needed, use class weights, resampling (undersample the majority, oversample or SMOTE the minority, on the training data only) or models and losses suited to rare events.

Keep reading with a membership

The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.

See plans and free trial Already a member? Sign in

More Machine Learning Fundamentals questions

← All Machine Learning Fundamentals questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake