
Loss Function is a formula that measures how wrong a model’s predictions are. Training a model means adjusting it to make this loss as small as possible.
What it means in plain English
To improve, a model needs a precise measure of how badly it is doing. The loss function provides that single number: a high loss means poor predictions, a low loss means good ones. Training is the process of minimising this number. Different tasks use different loss functions — one kind for predicting numbers, another for classifying categories — but the role is always the same: quantify the error so it can be reduced.
The loss function is the target the whole training process aims at.
A simple example
If a model predicts a house will sell for $300,000 and it actually sells for $350,000, a loss function converts that $50,000 gap into an error score. Averaged across many predictions, this score tells the model how well it is doing overall.
Why it matters
The loss function defines what “good” means for a model, and the entire training process is a quest to minimise it. Choosing the right loss function is essential, because it determines exactly what the model is being optimised to do.
Related terms
- Gradient Descent — the process that minimises the loss.
- Backpropagation — traces the loss back through the network.
- Model — what the loss function evaluates.
Frequently asked questions
What is a loss function?
A loss function measures how far a model’s predictions are from the correct answers — a single number the training process tries to minimise.
Why do loss functions matter?
The loss function defines what “good” means for the model; choosing the right one for the task (for example, cross-entropy for classification) directly shapes what the model learns.