This simple educational tutorial demonstrates some core concepts of supervised machine learning: what is overfitting and how validation helps to avoid it.
In this demo we machine-learn a very simple “hidden law” – one period of a sine function – from a noisy data using a very simple model – a 1D polynomial.
The demo is inspired by an Exercise 1.1 in Christopher Bishop’s book “Pattern Recognition and Machine Learning”, 2006.
An executable Python notebook which you can download, modify and run for yourself is available here: curve-over-fitting.ipynb.
A rendered HTML page version is available here: curve-over-fitting.html, or on nbviewer.jupyter.org.