When would you deliberately choose undersampling over oversampling?

Quick Overview

A machine learning interview question on when to undersample the majority class instead of oversampling the minority class in an imbalanced classification problem. It tests reasoning about dataset size, overfitting to duplicated or synthetic rows, boundary cleaning and probability correction after resampling.

When would you deliberately choose undersampling over oversampling?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

You are training a binary classifier on data where one class is far rarer than the other. When would you deliberately choose undersampling the majority class over oversampling the minority class? ```hint Look at the cost side Compare what each method does to the size of the training set when the majority class has millions of rows, many of them near-duplicates. ``` ```hint Look at the model side Think about what a high-capacity model does with minority rows that are repeated or synthesized. ``` ### What a Strong Answer Covers - The dataset size and redundancy conditions under which dropping majority rows loses little information - The overfitting risk that duplicated or synthetic minority rows create for high-capacity models - Informed undersampling methods that clean the class boundary, and how they differ from random undersampling - How ensembles recover the majority data a single undersampled model throws away - When undersampling is the wrong choice, and what resampling does to predicted probabilities and evaluation ### Follow-up Questions - After training on an undersampled set, how do you convert the model's scores back into probabilities for the real class ratio? - How do Tomek links and Edited Nearest Neighbours decide which majority points to remove? - When would class weights in the loss be a better choice than resampling of any kind? - How should the validation and test sets be built when the training set is resampled?

Overview: A machine learning interview question on when to undersample the majority class instead of oversampling the minority class in an imbalanced classification problem. It tests reasoning about dataset size, overfitting to duplicated or synthetic rows, boundary cleaning and probability correction after resampling.

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

You are training a binary classifier on data where one class is far rarer than the other. When would you deliberately choose undersampling the majority class over oversampling the minority class?

What a Strong Answer Covers Guidance

  • The dataset size and redundancy conditions under which dropping majority rows loses little information
  • The overfitting risk that duplicated or synthetic minority rows create for high-capacity models
  • Informed undersampling methods that clean the class boundary, and how they differ from random undersampling
  • How ensembles recover the majority data a single undersampled model throws away
  • When undersampling is the wrong choice, and what resampling does to predicted probabilities and evaluation

Follow-up Questions Guidance

  • After training on an undersampled set, how do you convert the model's scores back into probabilities for the real class ratio?
  • How do Tomek links and Edited Nearest Neighbours decide which majority points to remove?
  • When would class weights in the loss be a better choice than resampling of any kind?
  • How should the validation and test sets be built when the training set is resampled?