The Min-Max Normalization Formula
Min-Max normalization (also known as feature scaling) performs a linear transformation on the original data. It rescales the data from its original range to a new range [0, 1]
12. The formula is:
Where:
- is the original value.
- is the minimum value in the dataset.
- is the maximum value in the dataset.
- is the normalized/scaled value.
Min-max normalization preserves the relationships among the original data values. The cost of having this bounded range is that we will end up with smaller standard deviations, which can suppress the effect of outliers.
How It Handles Negative Numbers
, and the negative values will not remain negative after normalization.
The formula works the same way regardless of whether the numbers are positive or negative. Let’s walk through an example with negative values.
Suppose your dataset is: $[-10, -5, 0, 15, 20]$
- Identify the Min and Max:
- Calculate the Range:
- The range is
- Normalize Each Value:
- For the minimum value (): The minimum value always becomes .
- For a negative value ():
- For the maximum value (): The maximum value always becomes .
As you can see, the negative number −5 was successfully transformed into a positive value between 0 and 1. The key is that by subtracting the minimum value (which is negative in this case), you are effectively shifting all the data points up so that the lowest value starts at zero.