K-Nearest Neighbor from Scratch in Python
K-Nearest Neighbor is a simple machine learning algorithm that is intuitive and easy to learn. Watch here how I code one from scratch in Python! ?
# Table of Content
- Introduction: 0:00
- Theory: 1:50
- Scikit-Learn Implementation: 3:44
- Python Implementation: 7:08
- Conclusion: 11:24
Github link: https://github.com/yacineMahdid/artificial-intelligence-and-machine-learning
KNN is a very simple algorithm for classification, wikipedia define it as so:
"In k-NN classification, the output is a class membership. An object is classified by a plurality vote of its neighbors, with the object being assigned to the class most common among its k nearest neighbors (k is a positive integer, typically small). If k = 1, then the object is simply assigned to the class of that single nearest neighbor."
Which means that the label of a given point is given by it's k nearest neighbor as define by a distance metric. The parameter k is the only parameter that one needs to tweak in order to fit the data!
You can find the code for this here: https://github.com/yacineMahdid/artificial-intelligence-and-machine-learning
Just check to README to figure out the exact location of the code. When I refactor the folder structure something it breaks the link so I prefer to just link the repository.
----
Join the Discord for general discussion: https://discord.gg/QpkxRbQBpf
----
Follow Me Online Here:
Twitter: https://twitter.com/CodeThisCodeTh1
GitHub: https://github.com/yacineMahdid
LinkedIn: https://www.linkedin.com/in/yacine-mahdid-809425163/
Instagram: https://www.instagram.com/yacine_mahdid/
___
Have a great week! ?
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «K-Nearest Neighbor from Scratch in Python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.