HomeAlgorithms & AIThe Bias-Variance Tradeoff

📉 The Bias-Variance Tradeoff

Refit a polynomial regression model across resampled training sets in 3D and watch the fitted curves converge or scatter as you change model complexity and noise.

Algorithms & AI3DAdvanced60 FPS
bias-variance-tradeoff-model-complexity-lab ↗ Open standalone

Polynomial regression models are refit to several independently noisy resamples of the same underlying function, stacked along depth so you can watch the fitted curves converge or scatter as complexity changes.

🔬 What It Demonstrates

Low-degree fits stay nearly identical across resamples but miss the true curve's shape (high bias). High-degree fits chase each sample's noise and diverge wildly from one another (high variance). Total error is lowest in between.

🎮 How to Use

Raise the model complexity slider and watch the orange curves fan out. Increase noise or shrink the training set to see variance grow further. The three bars on the right track bias², variance and total error live.

💡 Did You Know?

The bias-variance decomposition, formalised by Geman, Bienenstock and Doursat in 1992, explains why a model with zero training error can still generalise terribly — it has memorised noise rather than signal.

⚙ Under the hood

Refit a polynomial regression model across resampled training sets in 3D and watch the fitted curves converge or scatter as you change model complexity and noise.

machine-learningregressionpolynomialresamplingmodel fittingThree.js

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)