Why must numeric features be scaled before applying SMOTE?
Last updated
SMOTE chooses interpolation partners by k-nearest-neighbor distance. Unscaled features with large ranges dominate that distance, so neighbors get chosen almost entirely on one feature, and the synthetic points come from the wrong pairs.
Distance is scale-sensitive:
Take income (0 to 1,000,000) and age (18 to 90): Euclidean distance is effectively income distance.
"Nearest" neighbors may then differ wildly on age and other features.
Interpolation itself isn't the issue:
The per-feature linear blend is scale-invariant.
The damage comes from bad neighbor selection, which produces implausible combinations and synthetics in unrealistic regions.
Do it correctly:
Fit the scaler on training folds only, then run SMOTE, then the model, all inside one pipeline to avoid leakage.
Watch for heavy outliers:
RobustScalermay suit them better thanStandardScaler.
[lang:python]
from imblearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from imblearn.over_sampling import SMOTE
from sklearn.linear_model import LogisticRegression
pipe = Pipeline([
("scale", StandardScaler()),
("smote", SMOTE(random_state=0)),
("clf", LogisticRegression()),
])