lukas / ml-class

Machine learning lessons and teaching projects designed for engineers
https://www.youtube.com/channel/UCBp3w4DCEC64FZr4k9ROxig
GNU General Public License v2.0
2.36k stars 1.17k forks source link

Adds interactive nbs for (over-)fitting by hand #52

Closed charlesfrye closed 4 years ago

charlesfrye commented 4 years ago

Adds two notebooks to a folder examples/by-hand that allow users to 1) fit a linear model by hand and 2) fit a local landmarks model by hand. Local landmarks is a cousin of nearest-neighbors that is not restricted to using points from the dataset. The latter demonstrates over-fitting.

The "by-hand" aspect is implemented with interactive matplotlib figures controlled by ipywidgets. The heavy lifting is done in utils/models.py and utils/landmarks.py.

Support for these was recently added to the hub, but isn't currently guaranteed by the requirements.txt of this repo. I can add what's needed, but currently requirements doesn't even include Jupyter, and seems aimed at supporting the projects.

Both notebooks include wandb tracking, with the settings pointing to the qualcomm entity, as in the other recently-used example sub-dirs. This may cause an error until an appropriate public project is created.