Oversampling
Definition
Repeating or creating more examples of a rare class so a dataset is more balanced before training.
In plain English
When one class is much rarer than the others, a model can score highly by simply ignoring it. Oversampling gives the rare class more weight by showing it more often.
Only oversample the training data. If copies leak into the validation set, your scores will look better than they really are.
Example
In a fraud dataset with 1 fraud case per 1,000 payments, you copy or synthesize extra fraud cases so the model actually learns what fraud looks like.
Draft, not yet reviewed by a person · Updated Nov 2026