Machine Learning Tutorial Python - 18: K nearest neighbors classification with python code

preview_player
Показать описание
In this video we will understand how K nearest neighbors algorithm work. Then write python code using sklearn library to build a knn (K nearest neighbors) model. The end, I have an exercise for you to practice concepts you learnt in this video.

⭐️ Timestamps ⭐️
00:00 Theory
03:51 Coding
14:09 Exercise

#️⃣ Social Media #️⃣

❗❗ DISCLAIMER: All opinions expressed in this video are of my own and not that of my employers'.
Рекомендации по теме
Комментарии
Автор

just a tip I read from a book: for highly structured data a smaller K is better (like this example, or handwritting/ speech recognition), but for noisy data it is recommended using a bigger K.
keep up the great videos!

flavio
Автор

I got a score of 0.99444 with k=6 while using random state to test the outcomes of each change in K. I've also discovered that sklearn has a module for displaying confusion matrix without using seaborn or matplotlib. The module is called ConfusionMatrixDisplay and it only takes the confusion matrix object as its parameter. Thanks Dhaval Patel sir.

Koome
Автор

When you said most important skill then said ctrl C/Ctrl V I lost it. haha. great video

PythonArms
Автор

iv tested the classification with KNN in the digits dataset and had an accuracy of 99.44% with n_neighbours=3 and test_size=0.2 of the split (i never see solutions) thank you for your tutorials its extremely useful (y) <3

zizoublbs
Автор

The best teacher makes simple the difficult subject. Thank you. You are great!!!

gusinthecloud
Автор

"How to become data scientist/ML engineer"
Views = 500K

"Tutorial on ML/DS topics"
Views = 5-10K

sums up how much effort everyone is putting to be a ML/DS guy🌝

नवीनसिंह-बब
Автор

Exercise Result 99.16% Score with k=4, Thank u so much sir, i m trying to solve all ur exercises and it is helping me build my confidence in ML

shylashreedev
Автор

Even my training institute is teaching from your codes only.
You are really a great teacher

alcryton
Автор

7:39 Most relatable statement I've heard so far

ghzich
Автор

I tested n_neighbors between 1 to 100 using cross validation and plotted the results. looks like as you increase number of neighbors, the score declines (the cool thing is it's linear)
highest score was at n_neighbors = 3 with test_size = 0.33 and it was 0.9915.

p.s: I have watched all the videos from this series and I've got to say you're amazing sir. keep making tutorials cause you're the best!

pouriab
Автор

Nice explanation and sir please continue this playlist it's really helpful to gain knowledge regarding Machine learning.
Thank you so much sir

vimalradadiya
Автор

The most important skill that you have is to copy the amazing knowledge you have and past it smoothly to our understanding. That is what I called mastering ctrl c and ctrl v

AG
Автор

Really an outlier in simplification. Awesome 🙏

pluscrazy
Автор

Going back to basics Boss!?! You are amazing !!

marcellodichiera
Автор

im gonna use my most important skill "Ctrl-C Ctrl-V" hahaha.. that funny sir

datastako
Автор

Plotted scores between 1 and 50 and found highest accuracy at k = 7 or k = 8 at 99.72% accuracy. Like everyone else, it sharply declined after that. Used the same parameters for data split as in the video.

paulkornreich
Автор

Your last comment is very sir.
Your are an amazing teacher sir.
Thanks a lot

nazmulhaqueomi
Автор

Very easy and meaningful explanation, Thank You Sir

sykkoho
Автор

First time here and I just have to subcribe. Very funny but good teacher. God bless you.

mbogitechconpts
Автор

Amazing
Please do it for other algorithms also

charmilam