Fitting by Walking

Rather than solving for a fitted line all at once, we can improve an initial guess through small adjustments. The gradient tells us which direction increases the error, so we can try moving the other way.

17 sections · 15 questions · 4 coding challenges

1 / 17

What If Solving Everything at Once Is Too Difficult?

BOTIE

A formula that gives the answer in one step is convenient, but it is not always available or practical. With many unknowns, even reducing a system of equations can create a problem harder to manage than the one we started with.

Cauchy raised this difficulty in 1847 while describing a general method for solving simultaneous equations. Instead of relying entirely on elimination, he considered progressively reducing a function that measures the discrepancy. This is an early source for the idea of steepest descent.

For regression, we start with a line and measure its error. We ask how a small change to each coefficient would change that error, then adjust in a direction that locally reduces it. We repeat because the useful direction can change after a step. The step size matters: a local slope is guidance near the current position, not permission to jump an arbitrary distance.

Sources for this history