The Simplest Model That Learns
The Answer Without Any Steps
Last timeWhich Way to Turn the Knobs
For a straight line and the squared score the best knobs can be written down directly, and understanding why that shortcut exists explains why almost nothing else has one.
The bottom of a bowl has no slope
Walk downhill on a bowl and the walking stops where the ground is level.
That is not a coincidence of bowls, it is what being the lowest point means:
anywhere with a slope has a downhill direction, so it is not the lowest.
So the lowest point of the score is wherever both slopes are zero. The
previous lesson has already written both slopes down. Setting them to zero
gives two equations, and two equations in two unknowns can be solved
directly, with no walking at all.
- the slope knob, now the unknown rather than a current setting
- the offset knob, likewise
- the input and the true value of example i, all of them known numbers
The right hand equation says something readable on its own. It says the errors
must add to zero, which means the fitted line passes exactly through the
average of the data. Whatever the slope turns out to be, the line pivots about
that one point.
Solving them
Use the second equation to express the offset in terms of the slope, put it
into the first, and the slope falls out.
The lesson stops here
4 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents