What is the difference between Kneighborsclassifier and Nearest Neighbors?

Asked

Viewed 16 times

0

I know the concept of neighborhood algorithms but came across two implementations in the Sklearn library Nearestneighbors and K-Nearestneighbors, but I could not understand the difference, it is something related to the definition of the parameter K?

1 answer

0

The K-Neareast Neighbors (KNN) expects as input a matrix with the points and their respective labels, that is, it is supervised learning because the input information is already classified, the contribution of the KNN is given a new information or point, determine which class it belongs to, ie which label already known it will receive. Nearest Neighbors acts without having any previous data labels, i.e., unsupervised learning, which is the main difference.

I got the answer but I’ll leave the topic in case anyone has the question too.

  • 1

    Please add further Details to expand on your Answer, such as Working code or Documentation citations.

  • Hello @Carlos, thank you for sharing your understanding with the community... If you have any references/link/etc.. that can help reinforce your answer / help others come to the same understanding you can add by clicking [Edit]. = D

Browser other questions tagged

You are not signed in. Login or sign up in order to post.