SMOTE
When one class is rare, a model can look accurate while quietly failing at the thing you care about most. SMOTE is a way to give that rare class more presence during training without simply duplicating the same examples again and again.
What SMOTE doesSMOTE stands for Synthetic Minority Over-sampling Technique. It creates new minority-class training examples by interpolating between real minority examples that are close to each other in feature space. Instead of copying a fraud case or a disease-positive case exactly, SMOTE picks one minority example, finds one of its nearest minority neighbors, and generates a new point somewhere along the line between them. This helps the model see a broader, denser minority region, which can improve recall and decision boundaries.
Why it matters in practiceIn tasks like fraud detection, churn prediction, or rare disease diagnosis, the minority class is the one you usually care most about. If you ignore imbalance, a classifier such as scikit-learn’s LogisticRegression or a tree model can lean too heavily toward the majority class. SMOTE helps by rebalancing the training set, but it must be applied correctly:
- Use it only on the training split, never before train/test splitting.
- Evaluate with metrics like precision, recall, F1, or PR AUC, not accuracy alone.
- It works best when nearby minority points really represent meaningful similarity.
SMOTE is not magic. It can create unrealistic samples if features are noisy, high-dimensional, or include awkward categorical variables. It can also blur class boundaries and increase overlap with the majority class. That is why variants such as Borderline-SMOTE and SMOTEENN exist. In Python, it is commonly used through imblearn.over_sampling.SMOTE from the imbalanced-learn library, often inside a pipeline so resampling happens safely during cross-validation.
SMOTE (Synthetic Minority Over-sampling Technique) is a resampling method that combats class imbalance by creating new synthetic minority-class training examples, typically by interpolating between existing minority samples in feature space. It matters because many supervised classifiers bias toward the majority class; SMOTE can improve minority recall and decision boundaries without simply duplicating data, though it must be applied carefully to avoid amplifying noise or leakage.
Imagine you’re training a security guard by showing photos of “normal visitors” and “intruders,” but you only have a handful of intruder photos. The guard will mostly learn what normal looks like and may miss intruders.
SMOTE (Synthetic Minority Over-sampling Technique) helps fix this by creating extra, made-up examples of the rare class—like generating new “intruder” photos that look realistic based on the few you already have. In supervised learning, this is useful for problems like fraud detection, disease screening, or spotting defective products, where the important cases are rare. By balancing the training data, models get a fairer chance to learn the warning signs.