# Scikit-learn Normalization mode (L1 vs L2 & Max)

I was wondering if anyone here can explain the difference between the $$L1$$, $$L2$$ and $$Max$$ normalization mode in sklearn.preprocessing.normalize() module?

Having read the documentation, I couldn't realize the difference!

The options lead to different normalizations. if $x$ is the vector of covariates of length $n$, and say that the normalized vector is $y = x / z$ then the three options denote what to use for $z$:
• L1: $z = \| x\|_1 = \sum_{i=1}^n |x_i|$
• L2: $z = \| x\|_2 = \sqrt{\sum_{i=1}^n x_i^2}$
• Max: $z = \max x_i$
Note that using Max does not take absolute values first, so it is not equal to the $l_\infty$ norm.
• If Max does not take absolute values first, would you get strange results when all the $x_i$ are negative, or worse if one or more were 0 and the rest negative? Feb 16 at 11:56