Question



How to manually compute KNN

Dr. Ballings,

I have read the K Nearest Neighbors section of the book, read all of the questions and answers on this forum, as well as referenced YouTube
and
Google, and I am still not sure how to begin this problem. I understand that I should be using a for loop, but I don't understand how to
utilize the for
loop since there is no reference to such a problem anywhere in the book--the only example I see is the single example that uses the
algorithm. Do
you have any suggestions as to where I can find some information that may help me solve this problem?

Thank you,
Lauren





Answers and follow-up questions





Answer or follow-up question 1

Dear Lauren,

For your convenience, here are all the questions about KNN:
http://www.ballings.co/qa/question.php?nbr=54
http://www.ballings.co/qa/question.php?nbr=22
http://www.ballings.co/qa/question.php?nbr=34
http://www.ballings.co/qa/question.php?nbr=33
http://www.ballings.co/qa/question.php?nbr=50
http://www.ballings.co/qa/question.php?nbr=16
http://www.ballings.co/qa/question.php?nbr=18
http://www.ballings.co/qa/question.php?nbr=49
http://www.ballings.co/qa/question.php?nbr=59

Here are two specific questions about the loop for KNN:
http://www.ballings.co/qa/question.php?nbr=57
http://www.ballings.co/qa/question.php?nbr=46

Also make sure to revise Section '2.4.3.9 Creating loops' in the book.

These give you all the elements that allow you to break down the problem in smaller problems,
and solve the exercise.

If you still have questions after reviewing the above, make sure to ask specific questions about subproblems.

Michel Ballings



Sign in to be able to add an answer or mark this question as resolved.