How a machine learns
The line that follows the data
For a machine, learning means finding the numbers that make it wrong as little as possible. Here there is only one: the slope of the line , which must pass as close as possible to six points.
For each point we take the residual, how far the point lies above or below the line. The error is the mean of the squared residuals:
where are the points and is how many there are.
Drag the line or the point on the curve: the error changes with w.
Try it
Exercise
With the line and the two points and , what is the error ?
Correct!
The residuals
The mean of the squares












