Model Selection: AIC vs BIC (2D)
Fit least-squares polynomials of degree 1 to 10 to noisy data in a live 2D lab and watch AIC and BIC penalize model complexity differently, each choosing a simpler model than raw training error ever would.
Statistical learning isn't just about fitting a curve — it's about choosing which curve to trust. This lab generates noisy samples from a hidden polynomial, fits real least-squares polynomials of degree 1 through 10 to them, and computes the Akaike and Bayesian information criteria for every candidate. A three-panel 2D view shows the inspected fit overlaying the actual data and the true curve on top, training RSS falling monotonically with degree in the middle, and a bar chart of AIC (orange) and BIC (green) across all ten degrees at the bottom, each marked at its own minimum. Push the noise up, shrink the sample, or change the true underlying complexity, and watch how the two criteria disagree on how much model complexity is actually justified by the data.
Fit least-squares polynomials of degree 1 to 10 to noisy data in a three-panel 2D lab and watch AIC and BIC penalize model complexity differently, each picking a simpler fit than raw training error ever would.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install