Machine Learning, FoundationsLesson 4 of 92

Module 1 · What learning is, and what it is not

The loss is where you state what a mistake costs

In this lesson

  • 9 min read
  • 8 reading sections
  • Knowledge check
  • Lesson 4 of 9 in this chapter

This chapter’s goalTake a vague business question, state it as a dataset with a defined row, a defined target and a defined moment of prediction, name the loss and the baseline it must beat, and justify in one paragraph whether machine learning is the right tool at all.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch1:44Not available
Full audiobookNot availableNot available
What log loss charges for one row whose true label is 1Predicted 0.90.10Predicted 0.60.51Predicted 0.014.6Predicted 0.00019.2log loss for a positive row at that predicted probabilityThe scale is not linear. Moving a prediction from 0.9 down to 0.6 costs about half a unit; moving from0.01 down to 0.0001 costs another 4.6. One confidently wrong row can outweigh dozens of nearly rightones, which is why a model trained on log loss learns to hedge.
The scale is not linear. Moving a prediction from 0.9 down to 0.6 costs about half a unit; moving from 0.01 down to 0.0001 costs another 4.6. One confidently wrong row can outweigh dozens of nearly right ones, which is why a model trained on log loss learns to hedge.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 10Free · no account needed
Lesson steps

Fitting means minimising something you chose

A model has parameters. Training searches for parameter values that make one number small. That number is the loss, and the choice of loss is not a technicality: it is the sentence “this is what being wrong costs me”, written in maths so an optimiser can act on it.

Two people with the same data and the same algorithm can get different models because they encoded different costs. Neither is wrong. Only one matches the situation.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the How a Language Model Actually Works exam.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘The loss is where you state what a mistake costs’, in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/what-a-loss-function-encodes (Accessed: 29 November 2026).