Table of contents
Upskilling Made Easy.
Feature Scaling in Machine Learning: Min-Max Scaling, Standardization, and Robust Scaling
Published 14 May 2025
1.5K+
5 sec read
markdown Copy
Feature scaling is a critical preprocessing step in machine learning that transforms features into a common scale, ensuring that no single feature dominates others due to its numeric range. Properly scaled features improve the performance of many algorithms, particularly those that rely on distance calculations, such as k-nearest neighbors (KNN) and support vector machines (SVM). This blog explores three popular feature scaling techniques: Min-Max Scaling, Standardization, and Robust Scaling.
Min-Max scaling is a technique that scales the features of a dataset to a fixed range, typically 0, 1. This transformation is useful when you want to preserve the relationships between the data while bringing all features into a uniform scale.
The Min-Max scaling formula is defined as:
X_scaled = X - min(X)/ max(X) - min(X)
Where:
Consider a dataset with feature values ranging from 50 to 200. After applying Min-Max scaling, a value of 100 would be transformed to 0.25 if you want to scale it to a 0, 1 range.
Standardization transforms the data so that it has a mean of 0 and a standard deviation of 1, resulting in a distribution with a standard normal distribution (also known as Gaussian distribution). This method is beneficial when the features follow a normal distribution.
The standardization formula is given by:
X_standardized = X - mu / sd
Where:
For a dataset with features that have a mean of 100 and a standard deviation of 20, a value of 120 would be standardized as follows:
X_standardized = 120 - 100 / 20 = 1
Robust scaling uses statistical measures that are robust to outliers, specifically the median and the interquartile range (IQR). It scales the data based on the central tendency and spread, making it an effective choice for datasets containing significant outliers.
The robust scaling formula is defined as:
X_scaled = X - median / IQR
Where:
If a dataset has a median of 50 and an IQR of 40 (e.g., Q1 = 30, Q3 = 70), a value of 70 would be scaled as follows:
X_scaled = 70 - 50 / 40 = 0.5
Feature scaling is a vital preprocessing step that ensures that all features contribute equally to the analysis and modeling process. Each scaling method—Min-Max scaling, standardization, and robust scaling—serves different purposes and is suitable in various cons depending on the nature of the dataset and the algorithms used. By selecting the appropriate feature scaling technique, you can enhance model performance and improve the outcomes of your machine learning tasks.
Happy scaling!