🤝 Your first model: nearest neighbor
Why: Build a complete, working ML model — nearest neighbor — in 15 lines of pure Python.
Unlocks: The map of everything beyond: neural networks, LLMs, and your road into them.
Time to build. The simplest real model is nearest neighbor, and its entire philosophy fits in one sentence: a new thing is probably the same kind as the most similar thing you've seen before. "Similar" = closest in feature space — plain distance between the numbers.
Read predict() again slowly. It's a linear search (hello, Algo Academy) for the smallest distance. Change the training data and the "knowledge" changes — no code edits. That's the flip from lesson one, running in your browser.
Now grade it honestly, like lesson three taught you:
Where is the nearest-neighbor model's "knowledge" stored?
Giant models like ChatGPT differ from your fruit classifier mainly by…
🎓 Course complete — and you've built the real thing. Where this road continues: k-nearest neighbors (vote among k closest), decision trees, then neural networks — each one a cleverer way to grow rules from examples. The ideas you own now (features, train/test, the flip) survive all the way up to the largest models on Earth. Meanwhile, everything you build lives in the Playground.