Upsampling#
Increasing minority-class examples to balance a dataset.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Upsampling (random oversampling) rebalances an imbalanced dataset by inflating the minority class — duplicating its examples until the classes are closer to even, so the classifier isn’t overwhelmed by the majority.
The risk#
Because it repeats existing points, upsampling can cause overfitting — the model learns patterns that only exist in the duplicated samples rather than the true minority distribution. The fix is SMOTE, which interpolates new synthetic points between a minority point and its nearest neighbors instead of copying, so no example is an exact duplicate.
When to use it#
Prefer upsampling when the dataset is small and discarding data would hurt. Critically, apply it to the training set only — resampling the validation or test set causes data leakage and inflates your metrics.
Theme: Imbalanced Learning & Resampling · All terminology
Hint
Mind map — connected ideas
Downsampling · Bootstrap · SMOTE (Synthetic Minority Over-sampling Technique) · Recall · Precision (a.k.a. Positive Predictive Value, PPV) · Model Stability
Hint
More in Imbalanced Learning & Resampling
Class Weighting · Cluster-based undersampling · Downsampling · NearMiss (Distance-based Undersampling) · Oversampling · Random Undersampling · SMOTE (Synthetic Minority Over-sampling Technique) · Subsampling
See also
Source article Adapted (context, re-expressed) in our own words from: Upsampling (insightful-data-lab.com).