All courses › Machine Learning and Data Analysis › Normalization

Normalization

Features on very different scales, like temperature in degrees and pressure in pascals, can make the model put too much weight on the largest numbers. Normalization puts them on the same scale, either between 0 and 1 or with mean 0 and standard deviation 1.

x′=x−xminxmax−xminx' = \frac{x - x_{min}}{x_{max} - x_{min}}min–max normalization
z=x−μσz = \frac{x - \mu}{\sigma}standardization

Symbols

x′x'normalized value
μ\mumean
σ\sigmastandard deviation

Example

Temperatures 10, 15 and 30:

15 becomes (15−10)/20=0.25(15 - 10)/20 = 0.25.

Find min, max, mean and standard deviation from the training data only.
Practise data and core concepts for free →

← Training and test data · Mean squared error →

Part of Machine Learning and Data Analysis: Data and core concepts.