What are the main families of techniques for handling class imbalance?

Quick Overview

Asks for the main families of techniques for handling class imbalance in classification, from resampling and class weights to threshold moving, ensembles and evaluation. Tests whether you can group the methods by where they act in the pipeline and explain their trade-offs.

What are the main families of techniques for handling class imbalance?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What are the main families of techniques for handling class imbalance? Assume a binary classifier where the positive class is a small fraction of the training rows. Group the techniques you know by where they act, and give examples for each group. ```hint Walk the pipeline Follow a model from the training data to the final yes/no decision in production, and ask at which steps the imbalance could be corrected or measured. ``` ### What a Strong Answer Covers - Data-level resampling methods, with examples of oversampling, undersampling and cleaning, and their risks. - Cost-sensitive learning through class weights or modified losses. - Decision-level fixes: choosing the threshold and calibrating probabilities. - Metrics and data splits suited to imbalanced data. - When to collect more data or reframe the task as anomaly detection. ### Follow-up Questions - Why must resampling happen only inside the training folds during cross-validation? - You trained on a 50/50 undersampled dataset and production has a 1% positive rate. How do you correct the predicted probabilities? - When would focal loss help more than plain class weights? - When is ROC-AUC misleading on imbalanced data, and what would you report instead?

Overview: Asks for the main families of techniques for handling class imbalance in classification, from resampling and class weights to threshold moving, ensembles and evaluation. Tests whether you can group the methods by where they act in the pipeline and explain their trade-offs.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

What are the main families of techniques for handling class imbalance?

Assume a binary classifier where the positive class is a small fraction of the training rows. Group the techniques you know by where they act, and give examples for each group.

What a Strong Answer Covers Guidance

  • Data-level resampling methods, with examples of oversampling, undersampling and cleaning, and their risks.
  • Cost-sensitive learning through class weights or modified losses.
  • Decision-level fixes: choosing the threshold and calibrating probabilities.
  • Metrics and data splits suited to imbalanced data.
  • When to collect more data or reframe the task as anomaly detection.

Follow-up Questions Guidance

  • Why must resampling happen only inside the training folds during cross-validation?
  • You trained on a 50/50 undersampled dataset and production has a 1% positive rate. How do you correct the predicted probabilities?
  • When would focal loss help more than plain class weights?
  • When is ROC-AUC misleading on imbalanced data, and what would you report instead?