AI Overfitting Tutorial: The Bias-Variance Trade

TL;DROverfitting vs underfitting is the bias–variance trade-off — the central modeling tension.

Underfitting (high bias): the model is too simple, missing real patterns — poor on both train and test. Overfitting (high variance): too complex, memorizing noise — great on train, poor on test. The goal is the middle: enough capacity to learn the signal, enough regularization/data to generalize. Watch the gap between training and validation performance to diagnose which you have.

Key points

Common mistakes

Try it: From a train/validation gap, decide whether you’re over- or underfitting.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>train 99% / val 70% → overfit (variance)
train 65% / val 64% → underfit (bias)
goal: high on both, small gap</pre></body></html>
Open the interactive lesson →
Batch Norm · Layer Norm · Group Norm Cross-Validation · K-Fold · Stratified