K-Nearest Neighbors Algorithm From Scratch In Python

preview_player
Показать описание
Here is a python implementation of KNN, make sure to leave your questions down below!

Timestamps
[00:00:00] – Introduce Tutorial & KNN Overview
[00:00:37] – Explain KNN Concept & Majority Voting
[00:03:18] – Setup Environment & Import Libraries
[00:06:46] – Load & Clean Dataset, Define Features/Target
[00:10:59] – Visualize Salary Distribution by Purchase
[00:12:58] – Implement Euclidean Distance Function
[00:15:43] – Build KNN Algorithm From Scratch
[00:22:02] – Split Data & Explain Train-Test Split
[00:25:01] – Tune K Value & Plot Accuracy Curve
[00:28:14] – Compare KNN Predictions with Actual Data

Consider...

i would love to hear any suggestions you have, leave them down in the comments!! (video ideas, editing tips, anything!!)
Рекомендации по теме
Комментарии
Автор

Such an impressive video! You explained everything so simply and clearly, taking the viewer from the basic concepts in the beginning to the details at the end. This is one of your best. Amazing.

icoqdcc
Автор

Great video, quick question... Let's say if want to predict based on age equals 35, salary equals $80, 000 what is function to predict whether or not a paper buys the phone? Thank you

deltaeconomics
Автор

I keep getting this error: TypeError: KNN() got multiple values for argument 'k_val'
Any ideas on how to fix it?

CB_
Автор

I get an error when i use the accuracy function passing the y_test and y_hat_test arguments "Found input variables with inconsistent numbers of samples" do you know what is the problem?
Thanks alot!

dfzgief
Автор

Did someone get this error ?
mode(labels).mode[0]

IndexError: invalid index to scalar variable.

AkshayaS-pu
Автор

I get error euclidean_distance() missing 1 required positional argument: 'pt2'

dingyomnivore
visit shbcf.ru