Does anyone know if there is a difference between K nearest neighbor (KNN) and nearest neighbor algorithm (NN)? And if they are how are they different?
So far all I know is that NN is unsupervised learning while KNN is supervised learning.
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.Sign up to join this community
Nearest Neighbors (NN) is a catch-all term for a whole family of methods that use search among the neighbors for different purposes. Scikit-learn named a whole module like this. $k$NN is a regression and classification algorithm that works by searching the database to find $k$ points the most similar to an example and average them to make the prediction. The other use may be in a content-based recommender system, where we are searching for some number of similar products to present them as recommendations. In both cases, we use the nearest neighbors search as a workhorse. Also, keep in mind that it is not a single algorithm, but there are multiple algorithms and their implementations for it, including exact and approximate ones (e.g. Spotify's Annoy).