Python Idle
Underfitting vs overfitting — the eternal ML struggle. A straight line is too simple to capture reality, but a wildly wiggly curve memorizes the noise instead of the signal. Somewhere in between lies the sweet spot. Your mission: generate synthetic data, fit polynomials of degree 1, 3, and 15, and see the tradeoff with your own eyes.
~15 minsandbox lab
Loading Python runtime...
Goals: 5 tests
should compute train errors for at least 3 polynomial degrees
should compute test errors for at least 3 polynomial degrees
degree-3 should have lower test error than degree-1 (underfitting)
degree-15 should have higher test error than degree-3 (overfitting)
Python loading...