Loss Function
A function that measures the error of a model: how much the prediction differs from the correct answer. The lower the value, the better the model.
Why It Is Needed
Training is a process of reducing error. The loss function provides a number by which gradient descent updates weights.
Popular Functions
| Function | Task |
|---|---|
| Cross-Entropy | Classification |
| MSE | Regression |
| MAE | Regression |
Loss vs Accuracy
Loss is 'how confidently the model is wrong', while accuracy is 'how many it got right'. Loss is more informative for training, accuracy is clearer for people.