Scale when the algorithm uses distances or gradient-based optimization: KNN, SVM, k-means, PCA, regularized linear models, and neural networks.
Tree-based models (decision tree, random forest, gradient boosting) are not affected, because splits depend on ordering, not magnitude.
Options: standardization (zero mean, unit variance) or min-max scaling; use robust scaling when there are outliers.
Fit the scaler on training data only and reuse it on validation and test data.
Loading…