Skip to content
Kudos AI

Bias-variance explorer

Sweep model complexity and sample size to watch training error fall monotonically while test error turns upward, decomposed into bias, variance, and irreducible noise.

FreeMachine LearningStatistics

Interactive: the bias-variance tradeoff

Training vs test error as complexity grows.

0.00.51.0irreducible noisemodel complexity →
Test errorTraining erroroptimal complexity
Regime
Well-fit
Training error
0.25
Test error
0.55

Near the sweet spot: the test error is close to its minimum.

Training error always falls as the model grows more flexible, so it is a misleading guide. Test error is bias² + variance + irreducible noise: it bottoms out where the two forces balance, then rises as the model fits noise. Add data (raise the sample size) and the variance term shrinks, pushing the sweet spot to higher complexity and lowering the whole test curve.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

The ideas behind it

7 min readStatistical Learning Foundations

The Bias-Variance Tradeoff

The exact decomposition of expected test error into squared bias, variance, and irreducible noise, demonstrated numerically with a 2,000-run simulation where all three terms are measured separately and shown to add up.

StatisticsMachine LearningMathematics
7 min readStatistical Learning Foundations

Cross-Validation and Resampling

Why training error is a biased estimate of test error, and how the validation set, leave-one-out, and k-fold approaches fix it, with a five-fold LOOCV computation worked out observation by observation.

StatisticsMachine Learning