A binary classifier is trained on a dataset where one class appears far more often than the other. Which approach is a standard way to mitigate that class imbalance?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Check this out—if 99 of 100 tickets are “normal,” a lazy model can score 99% accuracy by always shouting “normal.” Not very efficient for catching fraud! Here's the deal: you rebalance so the rare class actually gets a seat at the table—oversample the minority, undersample the majority, or use synthetic minority methods. Exam trap: folks grab learning rate or L2 and call it a day. Those are optimizers and regularizers, not imbalance fixes. When your boss walks in and says “we never catch the rare failures,” resampling or class weights are on the short list. Land this: fix the label distribution (or the loss weights), not just the step size.
Full explanation below image
Full Explanation
Class imbalance occurs when one label occurs much more frequently than others. Standard accuracy then becomes misleading because a constant predictor that always outputs the majority class can achieve high accuracy while failing on the minority class that often carries the business risk (fraud, defects, rare disease). Diagnosis therefore starts with class frequencies, confusion matrices, and metrics sensitive to the minority class.
A common family of remedies operates on the training distribution: oversampling the minority class (duplicating or synthesizing examples), undersampling the majority class (removing or down-weighting abundant examples), or hybrid approaches such as SMOTE. Closely related practices include class-weighted losses that penalize minority errors more heavily and evaluation metrics (precision, recall, F1, ROC-AUC, PR-AUC) that reflect minority performance. Threshold tuning on validation data is often as important as resampling.
Reducing feature count does not address label frequency; it is a separate concern about dimensionality, multicollinearity, or cost of features. Raising the learning rate changes optimization dynamics but leaves the empirical class prior intact and may cause unstable training. L2 regularization constrains model complexity and helps with overfitting, yet it is not a primary imbalance technique—though it may still be used alongside resampling or class weights.
Underlying principle: the optimizer and metrics must not be dominated by the majority class if minority errors are costly. Best practice combines appropriate metrics, resampling or class weights, careful validation that preserves real prevalence for reporting, and domain review of false negatives versus false positives. Memory aid: imbalance is about who shows up in the batch (or how errors are weighted), not about how big the gradient step is. On the exam, prefer answers that rebalance data or reweight the loss over generic hyperparameter or regularization knobs unless the question explicitly ties those knobs to weighted sampling schedules.