Machine Learning Course - Lesson 6: K Nearest Neighbors Classifier (JavaScript - No Libraries) @Radu
Machine Learning Course - Lesson 6: K Nearest Neighbors Classifier (JavaScript - No Libraries)  @Radu
Uploaded March 2023 | Updated September 2026, 2 weeks ago
A generalization of the nearest neighbor classifier is the k nearest neighbors classifier (KNN for sort). K is the number of neighbors that will play a role in the classification.

I'll teach you how to implement the K Nearest Neighbors classifier in JavaScript and use it for drawing recognition.

The Course: youtube.com/playlist?list=PLB0Tybl0UNfYe9aJXfWw-Dw_4VnFrqRC4

⭐️HOMEWORK⭐️
Try to calculate a probability for the classification to be correct, based on the number of neighbors of the predicted class. Most libraries (tensorflow, scikit-learn) support this feature and it can be a useful thing to have. Other variants of nearest neighbor classifiers exist as well, like a version weighted by distance or one that considers a fixed size neighborhood. Think you can implement any of these? Share your code with me on Discord
discord.com/invite/gJFcF5XVn9
I’ll showcase my favorite implementations in a future video.

⭐️LINKS⭐️

📁 Data
github.com/gniziemazity/drawing-data

💻 Code
tps://github.com/gniziemazity/ml-course
✔️ Use P5 to follow along
✔️ P6 is the code after this lesson


⭐️TIMESTAMPS⭐️
00:00 Introduction
00:47 Intuition for the K Nearest Neighbors
01:50 Implementing the K Nearest Neighbors Classifier
06:32 Visualizing the K Nearest Neighbors on the Chart
09:44 Homework (Neighbors)
Machine Learning Course - Lesson 6: K Nearest Neighbors Classifier (JavaScript - No Libraries)🚙Self-driving Car⛵BOAT⛵ Easter Egg 🐰🎅Machine Learning Course - Lesson 16: Optimizing Neural NetworksAdvanced Drawing App | LIVE JavaScript Coding | Part 1: Paths, Rectangles, Fills and StrokesJavaScript Infinite Zoom Effect (Part 2)AI Racing Game in JavaScript [Understanding AI - Lesson 8 / 15]JavaScript ❄️ Christmas Calendar 📅 Day 11 🎄🚙Self-driving Car‎‍💻🏢MY OFFICE🏢‎‍💻 Easter Egg 🐰🎅A Virtual World - JavaScript Course: Lesson 3 / 11 [Pan & Zoom with JavaScript]Ill Guess Your Number!Fine-Tuning the Racing Game with Self-driving Cars [Understanding AI - Lesson 15 / 15]JavaScript Hering Illusion Tutorial
Radu Mariescu-Istodor |

Machine Learning Course - Lesson 6: K Nearest Neighbors Classifier (JavaScript - No Libraries)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER