How exactly does SMOTE generate synthetic minority-class samples?
mediumAnswer
- For each minority-class point x, find its k nearest minority-class neighbours (default k=5).
- Pick one at random; call it x'.
- Generate a synthetic point where lambda is uniform in [0, 1] — a random interpolation on the segment between two real minority points.
- Repeat until the desired oversampling ratio is met.
- Works only on continuous features (interpolation makes no sense for categoricals — use SMOTE-NC or SMOTE-N variants for mixed / categorical data).
Check yourself — multiple choice
- Duplicate minority-class rows
- Linearly interpolate between a minority point and one of its k-NN minority neighbours
- Add Gaussian noise to majority points
- Randomly generate points in the whole feature space
SMOTE: interpolate along the segment between two real minority-class kNN points.
#imbalance#feature-engineering
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- When should you use PR-AUC instead of ROC-AUC?
- How do you handle class imbalance in a dataset?
- Why is the base rate of the positive class critical to know?
- When should you add interaction features to a linear model?
- When does log-transforming the target help a regression model?
- What do Box-Cox and Yeo-Johnson transforms do?