Learn Before
Formula

Squared Error Loss

The squared error is the standard loss function for regression problems, used to quantify the discrepancy between a single predicted value y^(i)\hat{y}^{(i)} and its true corresponding label y(i)y^{(i)}. The loss for a single example is defined mathematically as l^{(i)}(\mathbf{w}, b) = \frac{1}{2} \left(\hat{y}^{(i)} - y^{(i)} ight)^2. The quadratic form heavily penalizes large differences, and the constant fraction 12\frac{1}{2} is conventionally added because it cleanly cancels out when taking the derivative during optimization.

0

1

Updated 2026-05-03

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L