A cost function is like a scoreboard that tells you how well you're doing at solving a problem.
Imagine you're trying to throw a ball into a basket. Every time you throw the ball, the scoreboard checks where it lands, if it goes in the basket, you get a low score; if it misses completely, you get a high score. The cost function is that scoreboard: it helps you know how close you are to getting the right answer.
How It Works
Why It Matters
Just like you use the scoreboard to get better at throwing the ball, we use the cost function to help computers learn. Every time they make a mistake, the cost goes up. Then, they try again, and again, until the cost gets as low as possible, just like you learning to throw the ball into the basket!
Examples
Ask a question
See also
- What are clustering algorithms?
- What are supervised learning algorithms?
- How Does Regularization Work?
- What are adaptive step sizes?
- But what is a convolution?