Linear Regression: Fitting a Plane to Data
Watch multivariate linear regression learn live: a fitted plane climbs down the loss surface toward the true relationship as batch gradient descent updates its weights, with adjustable learning rate, noise, dataset size and L2 regularization.
This simulation makes multivariate linear regression visible in 3D: a cloud of noisy data points sits above a hidden linear relationship, and a fitted plane — starting from random weights — is trained live with batch gradient descent to match it. Points are coloured by how far they sit from the current prediction, so you can watch the fit tighten epoch by epoch as the green plane rotates and shifts toward the grey wireframe of the true relationship. Adjust the learning rate to see fast-but-unstable versus slow-but-steady convergence, raise the noise or shrink the dataset to see the fit get noisier, and dial in L2 regularization to watch the plane flatten and trade training accuracy for robustness — the same weight-update rule that trains every layer of a neural network, applied to a single linear unit you can actually see learn.
This simulation allows you to explore the core concepts of machine learning algorithms through a hands-on 2D environment. Experiment with different datasets and model parameters to observe how they impact predictions and training processes.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install