How does threshold moving compare to data resampling as a remedy for class imbalance?

Quick Overview

Asks how moving the decision threshold compares with resampling the training data as a fix for class imbalance. Tests your understanding of what each method changes, calibration and prior correction, leakage risks, and how to choose a threshold from costs or validation data.

How does threshold moving compare to data resampling as a remedy for class imbalance?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How does threshold moving compare to data resampling as a remedy for class imbalance? Think of a binary classifier where positives are a small fraction of the training data. ```hint Ranking versus deciding A classifier does two jobs: it orders cases by score, and it applies a cut-off. Ask which of the two each remedy actually changes. ``` ```hint Follow the probabilities Work out what a model trained on a 50/50 undersampled set will predict for a case whose true chance of being positive is 1%. ``` ### What a Strong Answer Covers - What each remedy changes (the training distribution or the decision cut-off) and why the two are often close to equivalent for a well-specified probabilistic model. - The advantages of threshold moving, and the one problem it cannot fix. - The side effects of resampling: lost information, overfitting, synthetic points, distorted probabilities and leakage risk. - The cases where resampling or class weights still help. - A practical default workflow and how it is validated. ### Follow-up Questions - How would you pick the threshold from a cost matrix where a missed positive costs 20 times a false alarm? - After undersampling the negatives, how do you map the model's scores back to real probabilities? - The positive rate in production drifts from 1% to 3%. How do you adjust the threshold without retraining? - When would you use class weights instead of either remedy?

Overview: Asks how moving the decision threshold compares with resampling the training data as a fix for class imbalance. Tests your understanding of what each method changes, calibration and prior correction, leakage risks, and how to choose a threshold from costs or validation data.

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

How does threshold moving compare to data resampling as a remedy for class imbalance? Think of a binary classifier where positives are a small fraction of the training data.

What a Strong Answer Covers Guidance

  • What each remedy changes (the training distribution or the decision cut-off) and why the two are often close to equivalent for a well-specified probabilistic model.
  • The advantages of threshold moving, and the one problem it cannot fix.
  • The side effects of resampling: lost information, overfitting, synthetic points, distorted probabilities and leakage risk.
  • The cases where resampling or class weights still help.
  • A practical default workflow and how it is validated.

Follow-up Questions Guidance

  • How would you pick the threshold from a cost matrix where a missed positive costs 20 times a false alarm?
  • After undersampling the negatives, how do you map the model's scores back to real probabilities?
  • The positive rate in production drifts from 1% to 3%. How do you adjust the threshold without retraining?
  • When would you use class weights instead of either remedy?