Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

Recommendation Engines

Submitted by : Anagha K
Class : CESP , M1
Roll no. : 04
GEC Thrissur
INTRODUCTION
Recommendation engines are a subclass of machine learning which
generally deal with ranking or rating products / users.
A recommender system is a system which predicts ratings a user
might give to a specific item. These predictions will then be ranked
and returned back to the user.
They’re used by various large name companies like Google,
Instagram, Spotify, Amazon, Reddit, Netflix etc.
For example, Amazon uses recommendations to suggest products to
various users based on the data they have collected for that user.
What Defines a Good Recommendation?

Good Recommendation help evaluate the performance of the


recommender you built.
The quality of a recommendation can be assessed through various
tactics which measure coverage and accuracy.
Accuracy is the fraction of correct recommendations out of total
possible recommendations.
Coverage measures the fraction of objects in the search space the
system is able to provide recommendations for.
Movie Recommender System
• Recommender systems are a way of suggesting or similar items and
ideas to a user’s specific way of thinking.
• Recommender System is different types:
 Content-Based Recommendation : It is supervised machine learning
used to induce a classifier to discriminate between interesting and
uninteresting items for the user.
 Collaborative Filtering : Collaborative Filtering recommends items
based on similarity measures.
Content-Based Recommendation System
• Content-Based systems recommends items to the customer similar to
previously high-rated items by the customer.
• It uses the features and properties of the item. From these properties,
it can calculate the similarity between the items.
• Content based systems try to match users to items which they’ve liked
previously.
• In a content-based recommendation system, first, we need to create a
profile for each item, which represents the properties of those items.
Content-Based Recommendation System
User Profile :
• The user profile is a vector that describes the user preference.
• From the user profiles are inferred for a particular user.
• We use these user profiles to recommend the items to the users .
Item Profile :
• In a content-based recommendation system, we need to build a
profile for each item, which contains the important properties of each
item.
• For Example, If the movie is an item, then its actors, director, release
year, and genre are its important properties.
Collaborative Filtering
• Collaborative filtering is based on the idea that similar people (based
on the data) generally tend to like similar things
• It predicts which item a user will like based on the item preferences of
other similar users.
• Collaborative filtering uses a user-item matrix to generate
recommendations.
• A user-item matrix contains the values which can represent either
explicit feedback or implicit feedback.
Algorithm
1. Import necessary packages.
2. Find the lowest and highest rated movies.
3. Use bayesian average for movies with very low dataset.
4. Create user-item matrix using scipy csr matrix .
5. Find similar movies using KNN .
Import necessary packages.

• Import all the required packages for the project.


Find the lowest and highest rated movies.
• Highest and lowest ratings of the movie is found by Explicit Feedback
in Collaborative Filtering.
• Explicit Feedback is the amount of data that is collected from the
users when they choose to do so. Many of the times, users choose
not to provide data for the user.
Use bayesian average for movies with very
low dataset
Understanding the Bayesian average
• Bayesian Average computes the mean of a population by not only
using the data residing in the population but also considering some
outside information, like a pre-existing belief - a derived property
from the dataset.
• Bayesian Average plays an important role by introducing pre-belief
into the scheme of things.
Create user-item matrix using scipy csr
matrix
• In recommender systems, we typically work with very sparse
matrices.
• In Python, sparse data structures are efficiently implemented in the
scipy.
• Compressed Sparse Row (CSR) is used for write-once-read-many
tasks.
• To efficiently represent a sparse matrix, CSR uses three numpy arrays
to store some relevant information namely data , indices and indptr.
Find similar movies using KNN .

• A Movie Recommendation System using collaborative filtering by


implementing the K-Nearest Neighbors algorithm.
• We will be using Cosine Similarity for finding the similarity between 2
movies.
• 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.
Image of Result
• According to the dataset , when we searched for the movie named
“Grumpier old men” following result was obtained.
CONCLUSION
• There are a lot of applications where websites collect data from their
users and use that data to predict the likes and dislikes of their users.
• This allows them to recommend the content that they like.
Recommender systems are a way of suggesting or similar items and
ideas to a user’s specific way of thinking.
• Future works can include generating recommendations through link
prediction, algorithmic approaches, bayesian models, markov models,
etc…
THANK YOU

You might also like