Experiments / live
Least squares playground
Drag any point and watch the best-fit line recompute in real time — the dashed gold sticks are the residuals it's trying to shrink. On the right, the same fit shown as a point on the loss surface over all possible slopes and intercepts; the white dot is the minimum. Add an outlier and watch both the line and the bowl's floor lurch. The full story — two derivations and why we square the errors — is in the essay.
data & fit
loss surface — L(a, b)
ŷ = a·x + b