You are on page 1of 8

Recommendation Systems Using

Nearest Neighbors
Presentation by 3101 Sudarshan Achaler
What are Recommendation Systems ?

Recommendation systems are the systems that are


designed to recommend things to the user based
on many different factors.

These systems predict the most likely product that


the users are most likely to purchase and are of
interest to.

Companies like Netflix, Amazon, etc. use


recommendation systems to help their users to
identify the correct product or movies for them.
How Recommendation Systems works ?
Recommendation systems use specialized algorithms
and machine learning solutions. Driven by the
automated configuration, coordination, and
management of machine learning predictive analytics
algorithms, the recommendation system can wisely
select which filters to apply to a particular user's
specific situation.

Mainly, a recommendation system processes data


through four phases as follows:

1. Collection

2. Storing

3. Analyzing

4. Filtering
Collaborative Filtering

Collaborative Filtering is considered to be one of the very smart recommender systems that work on the similarity between different
users and also items that are widely used as an e-commerce website and also online movie websites. It checks about the taste of
similar users and does recommendations.

The similarity is not restricted to the taste of the user moreover there can be consideration of similarity between different items also.
The system will give more efficient recommendations if we have a large volume of information about users and items.
K Nearest Neighbor
The k-nearest neighbors (KNN) algorithm is a simple,
supervised machine learning algorithm that can be
used to solve both classification and regression
problems.

KNN works by finding the distances between a query


and all the examples in the data, selecting the
specified number examples (K) closest to the query,
then votes for the most frequent label (in the case of
classification) or averages the labels (in the case of
regression).

It is also called a lazy learner algorithm because it


does not learn from the training set immediately
instead it stores the dataset and at the time of
classification, it performs an action on the dataset.
Item based Collaborative Filtering using KNN
To implement an item based collaborative filtering, KNN is a perfect go-to model and also a very good baseline for recommender
system development.

KNN does not make any assumptions on the underlying data distribution but it relies on item feature similarity. When KNN makes
inference about a movie, KNN will calculate the “distance” between the target movie and every other movie in its database, then it ranks
its distances and returns the top K nearest neighbor movies as the most similar movie recommendations.
Cosine Similarity with KNN
Let’s say we have 2 vectors.

If the vectors are close to parallel, i.e. angle between the vectors is 0, then we can say that both of them are “similar”, as cos(0)=1.
Whereas if the vectors are orthogonal, then we can say that they are independent or NOT “similar”, as cos(90)=0.
Thank You

You might also like