HomeAI & Machine LearningRegression Fit & Overfitting Explorer

📊 Regression Fit & Overfitting Explorer

Fit a polynomial surface to noisy 3D scatter data and watch it swing from underfit to overfit as you change model complexity, noise and sample size.

AI & Machine Learning3DAdvanced60 FPS
data-science-and-analytics-guide-lab ↗ Open standalone

A 3D scatter of noisy data points around a hidden true surface, with a polynomial regression fit you can push from too-simple to too-flexible, watching training and test error diverge as it overfits.

🔬 What It Demonstrates

The bias–variance tradeoff at the heart of predictive modeling: low-degree fits underfit real structure, high-degree fits chase noise, and only a middle ground generalizes well from training data to unseen test data.

🎮 How to Use

Pick a true pattern, then drag the complexity slider up and down while watching the fitted surface reshape and the train/test RMSE readouts respond. Increase noise or shrink the sample size to see overfitting appear sooner.

💡 Did You Know?

The same normal-equation least-squares math used here scales up to the linear and polynomial regression models that power real analytics pipelines — the difference is dimensionality, not the underlying idea.

⚙ Under the hood

Fit a polynomial surface to noisy 3D scatter data and watch it swing from underfit to overfit as you change model complexity, noise and sample size.

Machine LearningRegressionOverfittingData AnalysisPolynomials3D DataThree.js

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

What did you find?

Add reproduction steps (optional)