k-nearest neighbors (kNN) are a classical method for recommender systems. Ratings or items are predicted by using the past ratings/items of the k most similar users and/or items. If the influence of the similar users/items is weighted by the similarity, all users/items may be used for the prediction. Popular similarity metrics are the Pearson correlation and the cosine similarity. Using the user-item matrix to compute the similarity is often called collaborative filtering. Computing the item similarities from the item attributes leads to content-based filtering.
Adaptive kNN learns a similarity matrix that is particularly suitable for the recommendation task.