๐Ÿ“ˆ Model Quality

Overfitting Lab

Watch a model go from underfitting to just right to badly overfitting โ€” and discover why a model that's too clever on training data fails completely on new data!

๐Ÿ“ Add Data Points
๐Ÿ“ˆ Tune Complexity
๐Ÿ“‰ Learning Curves
๐Ÿ›ก๏ธ Regularisation
๐Ÿ† Badge

The Bias-Variance Trade-off

๐ŸŽฏ

Underfitting

Model is too simple โ€” misses the real pattern. High training error AND high test error. "The model didn't learn."

โœ…

Just Right

Model captures the true pattern without memorising noise. Low training error AND low test error. The goal!

๐ŸŒ€

Overfitting

Model memorises training data โ€” even the noise. Very low training error but HIGH test error. "It cheated."

๐Ÿ›ก๏ธ

Regularisation

Penalise model complexity. Forces simpler solutions. L1, L2, dropout โ€” all ways to prevent overfitting.

๐Ÿ“ˆ
Wizzy the AI Tutor
Welcome to the Overfitting Lab! ๐Ÿ“ˆ Click on the canvas to add data points. The points follow a hidden curve with some random noise added. The model's job is to find the curve โ€” but watch what happens when it tries too hard!

Step 1 โ€” Create Your Dataset

0 points
๐Ÿ’ก Click to add points ยท Or use the presets below

๐ŸŽ›๏ธ Controls

20
2
๐Ÿ“ Degree 2 โ€” Just Right

Error Scores

Train error
โ€”
Test error
โ€”
Add data points and tune the degree slider to see overfitting!
๐Ÿ“ˆ
Wizzy the AI Tutor
Now explore model complexity systematically! Click each degree to see what the fitted curve looks like. At degree 1 (a straight line), the model is underfit. At degree 12, it wiggles through every point โ€” classic overfitting! Which degree fits best?

Step 2 โ€” Explore Model Complexity

Click a polynomial degree:
Select a degree

Error Scores

Train error
โ€”
Test error
โ€”
Click a degree to see how complexity affects fit.
๐Ÿ“ˆ
Wizzy the AI Tutor
The learning curve is one of the most important tools in ML! It shows training error and validation error as you increase model complexity. The sweet spot is where validation error is at its lowest โ€” before it starts rising again. Drag the slider to explore!

Step 3 โ€” Learning Curves

๐ŸŸข Training error (always goes down) ๐Ÿ”ด Validation error (goes up when overfitting!) ๐ŸŸก Sweet spot (best degree)
๐Ÿ“ˆ
Wizzy the AI Tutor
Regularisation is the fix for overfitting! Instead of making the model simpler, we penalise large coefficients. A regularised degree-12 model produces a much smoother curve โ€” it can't wiggle wildly because that would make the penalty too high. Compare the two sides!

Step 4 โ€” Regularisation: The Fix

ฮป = 0.10

โŒ Overfit (Degree 12, no reg.)

Test error: โ€”

โœ… Regularised (Degree 12 + ฮป)

Test error: โ€”
Drag the ฮป slider to see how regularisation tames the overfitting curve!
๐Ÿ“ˆ
Wizzy the AI Tutor
๐ŸŽŠ You've mastered the most important concept in all of ML! Overfitting is why AI models fail in the real world. Every ML engineer fights it daily using train/test splits, learning curves, and regularisation. You now know exactly what they know!
๐Ÿ“ˆ

Model Quality Badge!

You mastered overfitting, learning curves, and regularisation!

๐Ÿ“ˆ WhizzStep AI Lab
This certifies that
Student Name
has mastered Overfitting, Bias-Variance & Regularisation
Overfitting Expert
Bias-Variance
ML Engineer
whizzstep.in

Key Concepts Mastered

Overfitting

๐ŸŒ€ Memorising Noise

When a model learns the training data too well โ€” including its noise โ€” it fails to generalise to new data.

Underfitting

๐Ÿ“ Too Simple

A model that hasn't learned the pattern at all. High bias. A straight line through clearly curved data.

Train/Test Split

โœ‚๏ธ Held-Out Data

Keep some data hidden from training. Test error on this holdout reveals overfitting before deployment.

Regularisation

๐Ÿ›ก๏ธ Complexity Penalty

Add a penalty term to the loss function that grows with coefficient size. Forces simpler, smoother models.

Bias-Variance

โš–๏ธ The Trade-off

High bias = underfit. High variance = overfit. The sweet spot balances both to minimise total error.

Cross-Validation

๐Ÿ”„ K-Fold

Split data into K folds. Train on K-1, test on 1. Repeat K times. More reliable than a single train/test split.