Undersampling
What Is Undersampling?
Undersampling deliberately keeps fewer data points or signal samples for a technical purpose. In machine learning, it reduces examples from an overrepresented class. In digital signal processing, it samples a filtered high-frequency band at a lower rate. These separate uses require safeguards against losing useful information.
Undersampling in Machine Learning
Machine learning undersampling addresses imbalanced datasets, where a majority class greatly outnumbers a minority class. For example, a support-ticket model may see many routine requests but few urgent escalations. A model can appear accurate while missing rare cases. Undersampling reduces majority records so it can better learn minority-class patterns.
How Machine Learning Undersampling Works
Resampling must stay inside the training workflow.
- Split original data into training, validation, and test sets, preferably with stratified class proportions.
- Set a baseline using original training data and suitable metrics.
- Undersample only the training portion.
- Train on the resampled data.
- Evaluate on untouched data and compare with the baseline.
Sampling before the split can leak related records into evaluation data, making performance look better than it is.
Random Undersampling vs. Cleaning Methods
Simple subsampling is fast, while advanced methods try to retain useful majority examples.
| Method | What it removes | Best fit and main risk |
|---|---|---|
| Random undersampling | Random majority records | Useful for large datasets, but may discard important cases. |
| Prototype selection | Redundant majority examples | Useful when representatives preserve patterns, but may oversimplify them. |
| Neighborhood cleaning | Noisy or ambiguous nearby records | Useful near class boundaries, but can remove valid difficult examples. |
Benefits of Undersampling
It is practical when the majority class is large and repetitive.
- Reduces training time, storage use, and compute demand.
- Makes minority-class signals more visible.
- Simplifies experimentation with large datasets.
- Helps prevent common records from dominating learning.
Limitations and Evaluation Safeguards
Undersampling trades data volume for balance, so validation is essential.
- Removed records may contain patterns the deployed model needs.
- Different random samples can produce different results.
- The training ratio may not reflect real-world class prevalence.
- Use precision, recall, F1 score, and precision-recall analysis, not accuracy alone.
- Repeat experiments and retain untouched, stratified validation and test sets.
Undersampling vs. Oversampling
Both methods address class imbalance, but change training data differently.
| Approach | How it works | Key consideration |
|---|---|---|
| Undersampling | Removes majority examples | Efficient, but loses information. |
| Oversampling | Duplicates or synthesizes minority examples | Retains majority data, but may increase overfitting risk. |
| Class weighting | Penalizes minority-class mistakes more heavily | Often a strong first test without changing records. |
Keep resampling inside the training pipeline so evaluation remains realistic.
Bandpass Undersampling in Signal Processing
In signal processing, bandpass undersampling intentionally samples a properly filtered high-frequency band so it maps into a lower frequency range. This reduces sampling requirements in a controlled design. Unplanned undersampling causes aliasing, where frequencies overlap and distort the digital signal. It is not the same as balancing machine learning data.
Using Undersampling in AI Application Development
When building an AI-enabled product, define representative training data and test rare user outcomes before deployment. Teams can use app design and development practices to specify evaluation checks, then review related concepts in the Emergent glossary. Build balanced AI apps with Emergent.
on Emergent today


