Gradient Descent Fit (2D): Linear Regression Live
A single-feature linear regression learns its slope and intercept live: watch a scatter plot, a fitted line and a loss curve update every frame as gradient descent walks downhill on the MSE loss surface.
This 2D companion strips the 3D original's two-feature regression down to one feature so the mechanics of gradient descent are easier to read: a hidden linear function generates noisy (x, y) samples, and each animation frame nudges a learned slope and intercept a step opposite the loss gradient, exactly as in the 3D version. The scatter plot shows the fitted line converging toward the true relationship while a loss-vs-iteration strip underneath shows the same optimization as a falling curve.
A single-feature linear regression learns its weight and bias live via gradient descent on the MSE loss, rendered as a scatter plot with a fitted line plus a loss-vs-iteration curve.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install