<aside> 💡

Min-max scaling (a form of normalisation) is a data pre-processing technique that transforms numerical features to a fixed range, typically between 0 and 1.

</aside>

image.png

Formula

$$ Xscaled = (X - Xmin) / (Xmax - Xmin) $$

Where:

Min-max scaling preserves zero values in sparse data, and preserves the shape of the original distribution. It’s useful for algorithms that are sensitive to the magnitude of features.

For example, neural networks and gradient descent-based algorithms are highly sensitive to feature magnitudes, as larger values can dominate the learning process and lead to slower convergence. Min-max scaling is useful in these situations.

However, min-max scaling handles outliers poorly as it compresses all values into a fixed range.

Example

Consider a dataset of NBA player heights in inches:

In this example, a player who is 78 inches (6'6") tall would be scaled to 0.5, representing they are exactly in the middle of the height range for the dataset.

image.png