How a computer learns from examples: rules by hand, a nearest-neighbour model written yourself, fair testing, then scikit-learn and a model behind a Gradio app, with what models get wrong.
Rules, then a nearest-neighbour model you write yourself, and how to test a model fairly.
Guess a penguin's species from its measurements with if rules, then score the rules on 342 real penguins.
Write a real machine-learning model yourself: to guess a new penguin's species, find the most similar penguin in the data and copy its answer.
Hold back some penguins to test on: a model tested on the data it learned from looks perfect, and only new data shows how good it really is.
The same ideas in scikit-learn, then a model behind an app, and what models get wrong.
Build the nearest-neighbour model and the fair test again with scikit-learn, the library data scientists use, then compare it with a decision tree.
Put the penguin model behind a Gradio app: sliders for the measurements, and the app says the species and how sure it is.
Find where the penguin model fails: a species it has never seen, impossible measurements and harder questions, and learn to say what a model cannot do.
Progress is saved in this browser only. Nothing is sent anywhere.
For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)