ML Math Lab — Polynomial Regression
Drag points → curve learns. Reveal test points → catch overfitting.
Mode: Explore
Goal: make it smart, not crazy
Score: 0
Section 1 — What you will learn
By the end you will understand
  • Degree = how “bendy” the curve brain is.
  • Training vs Testing = the truth moment.
  • Underfit (too stiff) & Overfit (too wiggly).
  • Smoothness Shield (λ) = regularization that calms the curve.
  • Error beams show MSE visually.
  • Noise is visible (beams from “true curve” to points).
Section 2 — Controls
Degree 1 is a straight stick. Degree 12 can become spaghetti.
Noise = real-life randomness. You will see it as vertical “noise beams”.
More points → curve becomes more reliable.
Higher λ forces the curve to stay calm (less wiggle).
Drag yellow points on the graph.
Cyan points are test points (hidden until you reveal).
Tip: low Train MSE + high Test MSE = overfitting.

Section 3 — Live stats
Train MSE
Test MSE
Hidden
Complexity
Hint

Section 4 — Math (simple)
What the model is doing Drag a point → watch the curve “re-learn”
Loading…
🧠 ML Buddy
Loading…
Tip: reveal test to catch overfitting.
Section 5 — Curve Playground
true curve (ghost) training points test points learned curve error beams noise beams
Live explanation
Drag a yellow point. The model will change its curve to reduce error.
Game HUD
Goal: make Train MSE low AND Test MSE low (generalization).
Model Health
Reveal test points to judge honestly.
Unknown
Overfit Meter
Hidden until you reveal test.
Quick actions
Center X helps you “see” spread. Calm increases λ. Spice increases degree.