Nepedia
Back to Discover
Independent Reader
🔢

Loss function

math Maturity 11-13 Next article →

Sometimes we make a guess or a choice. We might not get it right. A loss function is a math tool that measures our mistakes. It turns an error into a single number. This number shows the cost of being wrong.

Comparison of loss functions
Comparison of loss functions

In math, we often try to minimize this cost. Minimizing means making the number as small as possible. We want to find the best way to do things. In economics, this might show a loss of money. In insurance, it helps model the cost of paying benefits.

Fitting a straight line to a data with outliers
Fitting a straight line to a data with outliers

One common tool is the quadratic loss function. This is also called squared error loss. It is useful because it is symmetric. This means being too high by a certain amount is the same as being too low by that amount. However, this tool can be tricky. It gives a lot of weight to outliers. An outlier is a piece of data that is very different from the rest. If there are many outliers, experts might use other tools like Huber loss instead. Some people say we should pick tools based on real life. Real life is not always smooth or even. For example, arriving just one minute late for a plane is much worse than arriving early. This is an asymmetric cost because the two sides are not equal.

218 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Comparison of loss functions.png
Comparison of loss functions.png
File:Fitting a straight line to a data with outliers.png
Fitting a straight line to a data with...
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.