A user is using R to implement kNN classification model. The knn function in'class'package contains a parameter called cl: What does it mean?

389    Asked by AishwaryaJhadav in Data Science , Asked on Dec 20, 2019
Answered by Aishwarya Jhadav

KNN or K Nearest Neighbor is a non parametric or lazy learning algorithm which works while testing the data. It memorizes the unseen test data by comparing the observation with nearest training observations which are also time consuming while testing each data point.

The accuracy of this algorithm depends on the value of k set to compare the data points to classify the test data.

KNN can be explained with the prediction of voter based on geo location of nearest neighbor. Let us take the value of k=5 and see how it performs



Your Answer

Interviews

Parent Categories