Scaling to the maximum and minimum values
Scaling to the minimum and maximum values squeezes the values of the variables between 0
and 1
. To implement this scaling method, we subtract the minimum value from all the observations and divide the result by the value range – that is, the difference between the maximum and minimum values:
Scaling to the minimum and maximum is suitable for variables with very small standard deviations, when the models do not require data to be centered at zero, and when we want to preserve zero entries in sparse data, such as in one-hot encoded variables. On the downside, it is sensitive to outliers.
Getting ready
Scaling to the minimum and maximum value does not change the distribution of the variables, as illustrated in the following figure:
Figure 7.4 – Distribution of a normal and skewed variable before and after scaling to the minimum and maximum value
This scaling method standardizes the maximum...