1) General Meaning
- Upsampling means increasing the number of observations for under-represented data.
- Used mainly in two contexts:
- Imbalanced classification – fix class imbalance by enlarging minority class.
- Time series / signals – increase the sampling rate (more frequent data points).
2) Upsampling in Imbalanced Classification
- Suppose fraud detection dataset:
- Negatives = 10,000, Positives = 100 (highly imbalanced).
- If we upsample the minority class, we add more positive examples until classes are closer in size.
Strategies:
- Random oversampling
- Randomly duplicate minority samples until balance is reached.
- Simple, but risk of overfitting (model memorizes repeated samples).
- SMOTE (Synthetic Minority Oversampling Technique)
- Generate new synthetic samples by interpolating between existing minority examples.
- Example: if two minority points are close, create a new one in between.
- Reduces overfitting compared to plain duplication.
- ADASYN (Adaptive Synthetic Sampling)
- Like SMOTE but focuses on generating more synthetic points near “hard” (borderline) regions.
- Data augmentation (esp. in images, text, audio)
- Instead of random duplication, create realistic variations.
- Image: rotations, flips, brightness changes.
- Text: back-translation, synonym replacement.
- Audio: pitch shifting, noise injection.
Benefit:
- Improves model sensitivity to minority class (higher recall).
Risk:
- Can create artificial bias or noise if not carefully applied.
3) Upsampling in Time Series / Signal Processing
- Opposite of downsampling: increase temporal resolution.
- Example: You have daily temperature readings → upsample to hourly readings.
How to Upsample:
- Insert empty rows at new timestamps, then fill in values:
- Forward fill / backward fill: copy nearest known value.
- Interpolation: linear, spline, polynomial, etc.
- Zero-insertion + filtering: in digital signal processing, insert zeros between samples, then apply low-pass filter to reconstruct smooth curve.
4) Pros and Cons
Pros
- Classification: Helps the model not ignore minority classes.
- Time series: Useful for aligning datasets with different frequencies.
Cons
- Classification: Risk of overfitting or synthetic data artifacts.
- Time series: Interpolated values may not reflect real measurements.
5) Related Concepts
- Downsampling: reducing data (majority class or frequency).
- Class weighting: adjust the loss function instead of resampling.
- Balanced batch training: choose equal class samples per training batch instead of changing the dataset permanently.
Summary
- Upsampling (classification) = add more minority class samples (duplicate or synthesize) to balance the dataset.
- Upsampling (time series) = increase resolution by interpolation or data generation.
- Always balance realism vs bias/overfitting.
