Loss Function
What is Loss Function?
In one sentence: A loss function is a formula that measures how wrong a model's answer is, giving one number to make smaller.
After the model guesses, the loss function compares the guess with the right answer and gives a score: big when the guess is far off, small when it is close. Training is all about pushing that number down. It works like a "you're getting warmer or colder" game for the model.
What does Loss Function look like?
If a model guesses a house costs $200,000 but it really costs $300,000, the loss function turns that gap into a "wrongness" score.
Why does Loss Function matter?
The loss function tells the model what "better" means, so choosing it carefully shapes the whole model.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/loss-function/">Loss Function, explained simply</a> (The AI Math Dictionary)