Index Ai Academy
Phase 3 · Machine learning · Models

Loss functions

One number that says how wrong the model is.

About 25 minutes · Free account required

Open this lesson Create a free account

Why it matters

Training is optimization, and optimization needs a single number to minimize. That number is the loss, and choosing it is a real decision: squared error chases outliers, absolute error ignores them, and log loss punishes confident mistakes hard. The loss is how you tell a model what "good" means, so it should reflect what errors actually cost your business.

What you'll be able to do

  • Explain what a loss function is and why training needs one
  • Compute mean squared error, mean absolute error and Huber loss
  • Compute log loss for probability predictions
  • Choose a loss that matches what errors really cost

Before this lesson

Next in this phase: Training with gradient descent