L2 loss
A loss function that calculates the square of the difference between actual label values and the values that a model predicts.
Plain English Explanation
A loss function that calculates the square of the difference between actual label values and the values that a model predicts. For example, here's the calculation of L2 loss for a batch of five examples: Square of delta | --- | 1 | 1 | 9 | 4 | 1 | | 16 = L2 loss | Due to squaring, L2 loss amplifies the influence of outliers. That is, L2 loss reacts more strongly to bad predictions than L1 loss. For example, the L1 loss for the preceding batch would be 8 rather than 16. Notice that a single outlier accounts for 9 of the 16. Regression models typically use L2 loss as the loss function. The Mean Squared Error is the average L2 loss per example. Squared loss is another name for L2 loss.
where: - $n$ is the number of examples. - $y$ is the actual value of the label. - $\hat{y}$ is the value that the model predicts for $y$. --- See Logistic regression: Loss and regularization in Machine Learning Crash Course for more information.
How is it used?
Practitioners refer to l2 loss when building, training, or evaluating machine learning systems. It appears in research papers, product documentation, and technical discussions about AI capabilities and limitations.