Introduction

<aside> 💡

Max-abs scaling is a data preprocessing technique that scales each feature (variable) by dividing it by its maximum absolute value.

</aside>

The result is that all values fall within the range of -1 to 1 while preserving the sign of the original data.

image.png

The formula for max-abs scaling is:

$$ scaled = \frac{x}{\max(|x|)} $$

The difference between min-max scaling and max-abs scaling is that min-max scaling rescales the data to a fixed range between 0 and 1 (or sometimes $[−1,1]$), using the minimum and maximum values of the data.

Max-abs scaling is particularly useful for datasets that include both positive and negative values, as it maintains the relative magnitude and direction of the data while normalising it. Unlike other scaling methods, such as standardisation or min-max scaling, Max-abs scaling does not shift the data, which means features with a mean of zero will retain that property.

For example:

Raw Data: $(20, 1, −1, −46, 25, 42, 39, 48, 14, −25)$

Max-Abs Scaled Data: $(0.42, 0.02, −0.02, −0.96, 0.52, 0.88, 0.81, 1.00, 0.29, −0.52)$

Here, the max-abs scaling transformed the data to be within the range of [−1,1] based on the absolute maximum value (48) from the raw data.

This technique is computationally efficient and is often used in machine learning pipelines, especially when sparse data or algorithms sensitive to feature magnitude, like support vector machines (which we’ll cover later in the module), are involved.


Next reading: