Minideas

Idea 4 of 15 · How machines learn

How a model knows it’s wrong

A model makes guesses, measures how far off they are, and adjusts to shrink the gap.

house size →pricereal houses
1 / 4

Start with real examples

Each dot is a real house: its size along the bottom and its price going up. The model’s job is to predict a price from a size.

house size →pricereal housesthe model’s guesses
2 / 4

The model draws its best guess

The blue line is the model’s predicted price for every size. It can’t pass through every dot.

house size →pricereal housesthe model’s guesseshow far off
3 / 4

The gaps are errors

The distance from each real dot to the line shows how wrong the guess was for that house.

house size →pricereal housesthe model’s guesseshow far offmean squared error= average of the squares
4 / 4

Training shrinks the error

Training nudges the line, again and again, until the total error is as small as it can get. Each gap is squared first, so big misses count extra. Experts call this score the mean squared error.

Swipe the card, or use the arrow keys.

Go deeper

Each card stack gives you the idea. These open resources go into the detail.