How do you adapt resampling strategies when dealing with multi-class imbalanced data?

Quick Overview

Asks how to adapt oversampling and undersampling when a classification problem has several classes of very different sizes. Tests per-class sampling targets, SMOTE behavior with multiple minority classes, leakage-free cross-validation, and choosing metrics that expose rare-class failures.

How do you adapt resampling strategies when dealing with multi-class imbalanced data?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

How do you adapt resampling strategies when dealing with multi-class imbalanced data? For example, a classifier has four classes with 50,000, 4,000, 800 and 300 training examples. ```hint No single minority With two classes, "balance the data" has one meaning. With four classes of very different sizes, what exactly do you have to decide for each class? ``` ```hint Where SMOTE puts points SMOTE interpolates between a sample and its same-class neighbors. In a space shared by several small classes, where can those synthetic points end up? ``` ### What a Strong Answer Covers - Setting a target count per class, and why pushing every class to the majority count is rarely right - Combining undersampling of dominant classes with oversampling of rare ones, and where cleaning methods fit - The multi-class problems with SMOTE and its variants, including very small classes - Resampling only inside training folds and evaluating with per-class or macro metrics - Simpler alternatives such as class weights and per-class thresholds ### Follow-up Questions - After resampling changes the class proportions, how do you correct the model's predicted probabilities? - One class has only 5 training examples. What do you do with it? - When would you choose class weights over resampling for a gradient boosted model?

Overview: Asks how to adapt oversampling and undersampling when a classification problem has several classes of very different sizes. Tests per-class sampling targets, SMOTE behavior with multiple minority classes, leakage-free cross-validation, and choosing metrics that expose rare-class failures.

PracHub logo
General
Nov 25, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

How do you adapt resampling strategies when dealing with multi-class imbalanced data?

For example, a classifier has four classes with 50,000, 4,000, 800 and 300 training examples.

What a Strong Answer Covers Guidance

  • Setting a target count per class, and why pushing every class to the majority count is rarely right
  • Combining undersampling of dominant classes with oversampling of rare ones, and where cleaning methods fit
  • The multi-class problems with SMOTE and its variants, including very small classes
  • Resampling only inside training folds and evaluating with per-class or macro metrics
  • Simpler alternatives such as class weights and per-class thresholds

Follow-up Questions Guidance

  • After resampling changes the class proportions, how do you correct the model's predicted probabilities?
  • One class has only 5 training examples. What do you do with it?
  • When would you choose class weights over resampling for a gradient boosted model?