Implementing K-Nearest Neighbors (k-NN) from Scratch

preview_player
Показать описание
In this video, we implement K-Nearest Neighbors (k-NN) model from scratch.

#ai #softwareengineering #programming #stylepoint #knn

Chapters
0:00 - Intro
0:27 - Thinking about the API
1:37 - Philosophy behind using `dataclass`, typing, etc.
5:33 - Implementing the `predict` method
14:40 - Testing
16:28 - Outro
Рекомендации по теме
Комментарии
Автор

This video was a bit lengthier as I discussed why I use dataclass, naming conventions, type annotations, etc.
I will likely not do this in every video so in case anyone asks about the coding style, will have a reference video.

P.S. The actual code for the model is 24 lines of idiomatic Python (how awesome is that?)

davidoniani
Автор

Cool vid! Maybe the sound volume could be increased though.

inkt