Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
A loss function turns “how wrong the model is” into a single number to minimize. Your choice changes gradients, robustness to outliers, and how training behaves.
Training is an optimization problem: find parameters θ that minimize the expected loss.
Loss shapes the gradient. Gradient shapes the update. So loss isn’t just “measurement” – it’s the force that pushes learning.
The “best” loss is the one that matches your data noise model and your evaluation metric.
MSE grows quadratically, so it heavily penalizes large errors (and outliers).
MAE grows linearly, making it robust but less smooth around zero.
Huber is the compromise: quadratic near zero, linear for large errors.
Create outliers and see how the best-fit line changes depending on the loss. This is why robust losses exist.
Cross-entropy losses are built to turn probabilities into a training signal. Play with logits and see how loss and gradients react.