Overfitting You Can See: Train vs Validation Error
Degree 14 had a training error of 0.00 and a validation error of 3.27.
Video #184 ยท Machine learning and data science
Steps in the video
Files
- curves.py (24 lines)
- data.py (15 lines)
- run.py (15 lines)
Tested with
Python 3.12.15 | numpy==2.5.4
What this does not show
Made-up points from a known curve, one train and validation split, and no separate test set.
Sources
- https://developers.google.com/machine-learning/crash-course/overfitting/overfitting
- https://numpy.org/doc/stable/reference/generated/numpy.polynomial.polynomial.Polynomial.fit.html
- https://pypi.org/pypi/numpy/json
- https://scikit-learn.org/stable/auto_examples/model_selection/plot_underfitting_overfitting.html
- https://scikit-learn.org/stable/modules/learning_curve.html
Learning IT by Example.