Loss Function
A formula that measures how wrong a model's predictions are during training.
Which error does the training objective emphasize?
Imagine two equally weighted jobs with duration errors of one and three hours. The same pair of predictions gives two different training scores depending on how error is turned into a penalty.
| Absolute error | Absolute loss | Squared loss |
|---|---|---|
| 1 hour | 1 | 1 |
| 3 hours | 3 | 9 |
| Mean across jobs | 2 hours | 5 hours squared |
What does a model learn to prioritize?
Under absolute loss, the larger error contributes three times the penalty of the smaller one. Under squared loss it contributes nine times as much. Selecting a loss changes the incentive placed on improving particular predictions. It also changes the units, so the raw values 2 and 5 do not rank the two approaches.

Which measure belongs in the report?
Report performance in units meaningful to the user. For these jobs, root mean squared error is the square root of five, about 2.24 hours. Check that a training objective which emphasizes large misses actually reflects the costs of understaffing or overstaffing.
Follow the idea
Regression · Interpret signed and absolute residuals.
Model Evaluation · Choose evidence that reflects the user’s outcome.
Source · Google’s guide to regression loss
Return to Loss Function in the A–Z glossary