What is knn? How is knn done? Why is knn needed?
KNN stands for K Nearest Neighbour. It is probably one the most basic classificaiton algorithm (although it can be used in regression). This algorithm is generally parameterized using different hyperparameter like value of K, distance function, algorithm used to calculate neigherst neighbour etc. However this project illustrates the most basic selection of these parameters.
The principle behind nearest neighbor methods is to find a predefined number of training samples closest in distance to the new point, and predict the label from these.
The algorithm consists of the following stages
Although its not a state of the art algorithm, clever use of knn can be found in practical use case where there are less dimensions and involved and distibution of data is not taken into account.
@YearsOfNoLight/intro-to-image-classification-with-knn-987bc112f0c2">Intro to image classification with KNN
illustration/index.html
in browser (Only tested in chrome.)