Loss is the utility loss when a model makes a prediction. In simple terms, it is the difference between the observed and predicted values .
For linear models we could add up the loss for each prediction to find the overall loss value. However, this is not a good practice since positive errors (where predictions overshoot the observed value) and negative errors (where predictions undershoot the observed value) can offset each other and give us lower loss.
To prevent model loss values from offsetting, we could take the absolute value ( loss) or square the loss (
loss).
(1)
(2)
However, these values are not very descriptive; they do not give us a good understanding of how bad or good our model is, so we can get the average loss divided by the number of observations .
(3)
(4)