Skip to content
EduCS
← Machine learning

A4.3.1 HL · supervised learning

Linear regression and gradient descent

A line learns to fit the data by taking small steps downhill on its error. This is the same gradient descent that trains far larger models, shrunk to one line you can watch. Press play and follow the loss as it falls.

The solid line is the model; the orange stalks are its errors (residuals); the dashed green line is the exact best fit it is chasing. Click to add a point.