Skip to content
Learn Motion
ExploreHow it worksMembership
Log in
Learn Motion

How Machines Learn from Data

1Learning Without Being Told the Rules2Measuring Mistakes and Adjusting3Generalizing Beyond the Training Data4The Main Ways Machines Learn
Measuring Mistakes and Adjusting

Turning Many Errors into One Number

2 / 3
Loss is the model's report card for the whole dataset, not just one example. Squaring each error before averaging is a deliberate choice: it erases the sign so that being too high and being too low both count, and it makes a single large miss weigh more than several small ones. In the comparison, Model B has a loss of about 0.006 against Model A's 0.085, so Model B is clearly closer to the truth on these examples. Keep in mind that this only measures performance on data the model has already seen.
0:00 / 0:00

Loss is a single number that summarizes how wrong the model is across many examples, built by combining individual errors into one overall measure.

Why square the errors?

Squaring removes the sign so that overshooting and undershooting both count as mistakes, and it makes a few large errors weigh more heavily than many small ones. That matches the intuition that being badly wrong on one example is worse than being slightly wrong on several.

Same two examples, two models

Model A (errors 0.4, 0.1)

  • Squared errors: 0.16 and 0.01
  • Average loss: 0.085

Model B (errors 0.1, 0.05)

  • Squared errors: 0.01 and 0.0025
  • Average loss: 0.00625

A smaller loss means the model's predictions are closer to the correct answers on the data it was measured on. It does not yet tell you whether the model will do well on new data, only that it is doing better on the examples it has seen.

Previous2 / 3Next

Learn Motion

Generate a course. Learn it properly.

Operated by Wuhan Daoyin Technology Co., Ltd.

Contact: [email protected]
Privacy PolicyTerms of Service

© 2026 Learn Motion