Vectors and matrices

∥x∥1\|\mathbf{x}\|_1 L1 norm

The sum of the absolute values of the entries.

In ML papers

∥x∥1=∑i∣xi∣\|\mathbf{x}\|_1 = \sum_i |x_i|. As a penalty (lasso, L1 regularization) it pushes weights to exactly zero, giving sparse models. As a distance it is the "Manhattan" distance, and the mean absolute error is an L1 loss.

How to type it

LaTeXShows
\|\mathbf{x}\|_1∥x∥1\|\mathbf{x}\|_1

A worked example

∥(3,−4)∥1=3+4=7\|(3, -4)\|_1 = 3 + 4 = 7

The L2 norm of the same vector is 5.

Related

∥x∥2\|\mathbf{x}\|_2Norm∣x∣|x|Absolute value (bars)λ∥w∥22\lambda \|\mathbf{w}\|_2^2Lambda

Decode this example →