Skip to content
AI360Xpert
Glossary
Definition

Class Imbalance

A classification problem where one class is far rarer than another, so accuracy stops describing anything useful.

At a 0.3% fraud rate, a model that always predicts "not fraud" is 99.7% accurate and worth nothing. That's the whole problem in one line, and it's a metric problem before it's a data problem.

So the fixes run in this order: change the metric to precision, recall and precision-recall AUC; move the decision threshold, since 0.5 was never a considered choice; weight the classes in the loss; and only then resample. ROC AUC is the trap, because its false-positive rate divides by the huge negative class and barely moves while precision collapses.

Two rules that get broken. Resample the training fold only, because a resampled validation set has the wrong base rate and its precision means nothing. And recalibrate afterwards if anything downstream reads your output as a probability, since both resampling and class weighting shift the scores upward.