Which model families cope better with class imbalance out of the box, and why?

Quick Overview

Asks which common model families handle class imbalance best with default training and what makes the difference. Tests understanding of ranking versus thresholds, how each loss reacts to a skewed class ratio, and the built-in options for imbalanced data.

Which model families cope better with class imbalance out of the box, and why?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Which model families cope better with class imbalance out of the box, and why? "Out of the box" here means default training, with no resampling, class weights or threshold tuning. ```hint Split ranking from decisions Ask two separate things of each model: how well its scores order positives above negatives, and what its default threshold does with those scores. ``` ```hint Look at the loss Most training objectives are a sum over examples. Think about which class contributes most of the terms, and how each model family reacts to that. ``` ### What a Strong Answer Covers - What "coping with imbalance" means, with ranking quality kept apart from the default decision threshold - How the training objective of the main families (gradient boosting, random forests, logistic regression, SVMs) responds to a skewed class ratio - Which families are weaker without adjustment, and why - The built-in options each family offers for handling imbalance ### Follow-up Questions - How would you evaluate models on a dataset with 1% positives, and why is accuracy misleading there? - If you train logistic regression on data where the majority class was downsampled, how do you correct its predicted probabilities? - How does class weighting affect calibration, and how would you repair it? - How does focal loss change training compared with class-weighted cross-entropy?

Overview: Asks which common model families handle class imbalance best with default training and what makes the difference. Tests understanding of ranking versus thresholds, how each loss reacts to a skewed class ratio, and the built-in options for imbalanced data.

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

Which model families cope better with class imbalance out of the box, and why? "Out of the box" here means default training, with no resampling, class weights or threshold tuning.

What a Strong Answer Covers Guidance

  • What "coping with imbalance" means, with ranking quality kept apart from the default decision threshold
  • How the training objective of the main families (gradient boosting, random forests, logistic regression, SVMs) responds to a skewed class ratio
  • Which families are weaker without adjustment, and why
  • The built-in options each family offers for handling imbalance

Follow-up Questions Guidance

  • How would you evaluate models on a dataset with 1% positives, and why is accuracy misleading there?
  • If you train logistic regression on data where the majority class was downsampled, how do you correct its predicted probabilities?
  • How does class weighting affect calibration, and how would you repair it?
  • How does focal loss change training compared with class-weighted cross-entropy?