Why can NearMiss undersampling lead to poor generalization on the unseen majority class distribution?

Quick Overview

Asks why NearMiss undersampling of the majority class can make a classifier generalize poorly to the full majority distribution it meets after deployment. Tests understanding of sampling bias, class overlap, noise sensitivity and probability calibration on imbalanced data.

Why can NearMiss undersampling lead to poor generalization on the unseen majority class distribution?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

You are training a classifier on a heavily imbalanced dataset and shrink the majority class with `NearMiss` undersampling. Why can this lead to poor generalization on the unseen majority class distribution? ```hint Look at which points survive Compare the majority points NearMiss keeps with the full majority distribution the model will meet in production. ``` ```hint Separate the two things a sampler can change Write $p(y \mid x)$ in terms of the class prior and the class-conditional density, and ask which of the two NearMiss alters. ``` ### What a Strong Answer Covers - What NearMiss selects, including how its versions differ - Which parts of the majority distribution go missing from training, and what the model predicts in those regions - How class overlap and noisy minority points shape the kept sample - Why probability calibration breaks, and why a simple prior correction cannot repair it - Alternatives, and a validation setup that exposes the problem ### Follow-up Questions - Random undersampling also changes the class prior. Why can its probabilities be corrected in closed form while those of NearMiss cannot? - When could NearMiss still be a reasonable choice? - How would you compare NearMiss, random undersampling and class weighting fairly on the same problem? - How do Tomek links and edited nearest neighbours differ from NearMiss in which majority points they remove?

Overview: Asks why NearMiss undersampling of the majority class can make a classifier generalize poorly to the full majority distribution it meets after deployment. Tests understanding of sampling bias, class overlap, noise sensitivity and probability calibration on imbalanced data.

Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

You are training a classifier on a heavily imbalanced dataset and shrink the majority class with NearMiss undersampling. Why can this lead to poor generalization on the unseen majority class distribution?

What a Strong Answer Covers Guidance

  • What NearMiss selects, including how its versions differ
  • Which parts of the majority distribution go missing from training, and what the model predicts in those regions
  • How class overlap and noisy minority points shape the kept sample
  • Why probability calibration breaks, and why a simple prior correction cannot repair it
  • Alternatives, and a validation setup that exposes the problem

Follow-up Questions Guidance

  • Random undersampling also changes the class prior. Why can its probabilities be corrected in closed form while those of NearMiss cannot?
  • When could NearMiss still be a reasonable choice?
  • How would you compare NearMiss, random undersampling and class weighting fairly on the same problem?
  • How do Tomek links and edited nearest neighbours differ from NearMiss in which majority points they remove?