Normalization (machine learning)

L2 normalization equation: x_i' = x_i / ||x||_2

Image: decltype, CC BY-SA 3.0, via Wikimedia Commons

Normalization (machine learning)

L2 normalization equation: x_i' = x_i / ||x||_2

L2 normalization is a technique used to scale vectors in machine learning. The equation x_i' = x_i / ||x||_2 represents this process, where x_i' is the normalized vector, x_i is the original vector, and ||x||_2 is the L2 norm of the vector x.

Example

Consider a vector x = [3, 4]. The L2 norm ||x||_2 is calculated as √(3² + 4²) = 5. Thus, the L2 normalized vector x' = [3/5, 4/5] = [0.6, 0.8].

L2 normalization ensures that vectors have a unit norm, which can improve the performance of machine learning algorithms and facilitate better convergence during training.

Related concepts

One email a day: 5 concepts + the 5 stories that matter →

Swipe through 100 ML concepts daily

Open TickerNews