What is the difference between normalization and standardization?
Normalization and standardization are both feature-scaling techniques, but they transform numerical data in different ways.
Normalization
Normalization usually rescales values into a fixed range, commonly 0 to 1.
A common formula is:
x_normalized = (x - min) / (max - min)After normalization:
- the minimum observed value becomes
0 - the maximum observed value becomes
1 - all other values fall between them
Normalization is useful when a bounded range is desirable.
Standardization
Standardization transforms values according to the feature's mean and standard deviation.
A common formula is:
z = (x - mean) / standard_deviationAfter standardization, the feature typically has:
- a mean close to
0 - a standard deviation close to
1
The values are not restricted to a fixed range.
The main difference
Normalization is based on the minimum and maximum values of a feature.
Standardization is based on the mean and standard deviation.
For example, normalization may produce values such as:
0.0, 0.4, 1.0while standardization may produce:
-1.2, 0.1, 2.0Sensitivity to outliers
Min-max normalization can be strongly affected by extreme minimum or maximum values.
Standardization can also be influenced by outliers because both the mean and standard deviation are affected by extreme values.
Neither method is automatically best for every dataset.
Which one should you use?
The choice depends on the algorithm, data distribution, and preprocessing requirements.
In general:
- use normalization when a bounded range is useful
- use standardization when centering and variance-based scaling are more appropriate
Whichever method is used, its parameters must be learned from the training data only and then applied unchanged to validation and test data.
In short, normalization usually maps values into a fixed range, while standardization expresses values relative to the feature's mean and standard deviation.
Learning Sequence
Machine Learning Curriculum
Which machine learning algorithms are sensitive to feature scaling?
Explore Related Questions
Deepen your understanding across related Machine Learning topics.