Best Answer · By JanBask Data Science Expert
Answered on Dec 20, 2019
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