SlideShare a Scribd company logo
1 of 19
Download to read offline
Recommender Systems:
Content-based Filtering
AAA-Python Edition
Plan
●
1- Introduction
●
2- Content Based Filtering with Decision Trees
●
3- User profles Learning with Decision Trees
●
4- Make predictions with the decision tree
●
5- Nearest Neighbor Method
●
6- Polynomial Regression
3
1-Introduction
[By Amina Delali]
ConceptConcept
●
As said in [Francesco et al., 2011], Content Based
recommendation systems try to recommend items similar to
those a given user has liked in the past.
●
The recommendation for an item to a user is based on the
actual features that this item has. And, on actual feedback and
reviews that this user has already done.
●
The system is build around 3 components:
➢
The item description: each item is described by a set of
attributes (features)
➢
The user profle: each user is described by a model generated
from the features of the items rated by that user
➢
A matching strategy: how to match up the user’s profle
attributes with an item attributes
4
1-Introduction
[By Amina Delali]
ProcessProcess
Analyze content
Learn users profiles
Build a filtering
component
We preprocess the data to
construct a structured items
description
We use the users
preferences for items
to construct a user
profile
We use the user profile to recommend new
items by matching the representation of the
user’s profile with the representation of the new
items. Feedback of the user on these
recommendations are used to enhance the
user profile.
5
1-Introduction
[By Amina Delali]
Learning User ProflesLearning User Profles
●
Diferent approaches exist to construct a user profle. They are
based on techniques of text classifcation:
➢
Probabilistic methods and Naive Bayes: a probabilistic text
classifcation approach based on the Naive Bayesian Classifer
(see Week4 lesson 3 for more details)
➢
Rocchio’s algorithm: is a relevant feedback algorithm. It
refnes the recommendations by using the feedback of users on
these recommendation. The update process takes into account
relevant and non relevant recommended items.
➢
Decision Trees Classifer (see Week5 lesson 1)
➢
Nearest neighbors algorithm (this week, lesson 1)
➢
Linear Classifers (week 4 lessons)
6
2-ContentBased
Filteringwith
DecisionTrees
[By Amina Delali]
ConceptConcept
●
Each user profle will be represented by a Decision Tree
Classifer. The tree will learn from the description of items he
already reviewed
●
The labels will be the ratings (or like and dislike) the user had
given to these items.
●
The resulting Tree will later used to:
➢
predict the review (rating) of a new item.
➢
make a list of recommendations to that user based on the
predictions on a list of items.
7
2-ContentBased
Filteringwith
DecisionTrees
[By Amina Delali]
Items DescriptionItems Description
●
In general, the items are described by text. So, in order to use
them, we have to vectorize our text data. (See week 4 lesson1)
●
We will built a movie recommender for one user, using the data
available at: The Movies Dataset | Kaggle
The file contain a description for
45466 movies in 24 columns
8
2-ContentBased
Filteringwith
DecisionTrees
[By Amina Delali]
The LabelsThe Labels
●
We will use the ratings that users gave to these movies as labels.
●
We will select only the ratings made by the user with the id_user
= 2
The data contains
1000004 ratings
9
3-UserproflesLearning
withDecisionTrees
[By Amina Delali]
Preparing the DataPreparing the Data
●
In this phase we will merge the ratings done by the user 2 with
the description of the movies he rated. (More details about
merging operations are available in week 3 lesson 1)
The id type in
the user
dataframe was
int, and in the
movies
dataframe , it
was a string. So
, we had to
convert one of
them before
making the
merge
10
3-UserproflesLearning
withDecisionTrees
[By Amina Delali]
Extracting FeaturesExtracting Features
●
We will user
only the
overview of
the movie as
description
attribute. The
rating is for the
classification
labels
We apply
a TF-IDF
transform
ation on
the
overview
attribute
Words available in the overviews
11
3-UserproflesLearning
withDecisionTrees
[By Amina Delali]
Learning the User’s ProfleLearning the User’s Profle
●
The tree representing the user’s
model
12
4-Makepredictions
withthedecisiontree
[By Amina Delali]
Not rated moviesNot rated movies
●
We have to create the list of the movies that the user 2 didn't rate.
Then we will select only 30 movies.
●
We have also to select only the features represented in the user's
profle.
We selected
only 30 movies
for memory
issues
13
4-Makepredictions
withthedecisiontree
[By Amina Delali]
Not rated movies (suite)Not rated movies (suite)
●
The items description used for the prediction must:
●
Contain the same features as those used by tree classifier
to model the user’s profile
●
The features must be ordered the same way.
14
4-Makepredictions
withthedecisiontree
[By Amina Delali]
Make predictionsMake predictions
●
We will make predictions for the frst 30 movies in myX2.
●
Then, we will sort these predictions, and select the 10 frst ratings
Since we didn’t change the order of the rows of the dataframe
corresponding to the “not rated” movies ‘myDFnotB2) , and
since we selected only the first elements sequentially, the
order the predictions array and the myDFnotB2 frame is the
same.
15
5-NearestNeighbor
Method
[By Amina Delali]
ConceptConcept
●
After preparing the descriptions of the items rated by one user.
And in order to predict a review on a new item (by that user):
➢
Compute the similarity between the new item and all the rated
item
➢
➢
Select the nearest or the k nearest neighbors items using the
computed similarities
➢
aggregate the ratings of the selected items.
●
In the case of vectorized text attributes, the cosine similarity
measure could be used.
16
5-NearestNeighbor
Method
[By Amina Delali]
Compute similaritiesCompute similarities
●
We will select one item from the not rated items (of the previous
section), then we will compute its cosine similarities with all the
movies rated by the user 2
17
5-NearestNeighbor
Method
[By Amina Delali]
Make predictionsMake predictions
●
References
●
[Francesco et al., 2011] Francesco, R., Lior, R., Bracha, S.,
and Paul B., K., editors (2011). Recommender Systems
Handbook. Springer Science+Business Media.
●
[Kaggle, ] Kaggle. The movies dataset.
https://www.kaggle.com/rounakbanik/the-movies-dataset.
●
[Pazzani and Billsus, 2007] Pazzani, M. J. and Billsus, D.
(2007). Content-based recommendation systems. In The
adaptive web, pages 325–341. Springer
Thank
you!
FOR ALL YOUR TIME

More Related Content

What's hot

Movie lens recommender systems
Movie lens recommender systemsMovie lens recommender systems
Movie lens recommender systemsKapil Garg
 
Recommendation system
Recommendation systemRecommendation system
Recommendation systemDing Li
 
Mutable and immutable classes
Mutable and  immutable classesMutable and  immutable classes
Mutable and immutable classesTech_MX
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filteringNeha Kulkarni
 
[UMAP 2016] User-Oriented Context Suggestion
[UMAP 2016] User-Oriented Context Suggestion[UMAP 2016] User-Oriented Context Suggestion
[UMAP 2016] User-Oriented Context SuggestionYONG ZHENG
 
Collaborative filtering at scale
Collaborative filtering at scaleCollaborative filtering at scale
Collaborative filtering at scalehuguk
 
[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation Approach
[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation Approach[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation Approach
[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation ApproachYONG ZHENG
 
Accessing non static members from the main
Accessing non static members from the mainAccessing non static members from the main
Accessing non static members from the mainTutors On Net
 
[Decisions2013@RecSys]The Role of Emotions in Context-aware Recommendation
[Decisions2013@RecSys]The Role of Emotions in Context-aware Recommendation[Decisions2013@RecSys]The Role of Emotions in Context-aware Recommendation
[Decisions2013@RecSys]The Role of Emotions in Context-aware RecommendationYONG ZHENG
 
[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware Personalization
[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware Personalization[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware Personalization
[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware PersonalizationYONG ZHENG
 
CSTalks-Quaternary Semantics Recomandation System-24 Aug
CSTalks-Quaternary Semantics Recomandation System-24 AugCSTalks-Quaternary Semantics Recomandation System-24 Aug
CSTalks-Quaternary Semantics Recomandation System-24 Augcstalks
 
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...Geetika Gautam
 
Collaborative Filtering using KNN
Collaborative Filtering using KNNCollaborative Filtering using KNN
Collaborative Filtering using KNNŞeyda Hatipoğlu
 
Latent factor models for Collaborative Filtering
Latent factor models for Collaborative FilteringLatent factor models for Collaborative Filtering
Latent factor models for Collaborative Filteringsscdotopen
 
Rating System:Various rating algorithms Review.
Rating System:Various rating algorithms Review.Rating System:Various rating algorithms Review.
Rating System:Various rating algorithms Review.Scandala Tamang
 

What's hot (20)

Movie lens recommender systems
Movie lens recommender systemsMovie lens recommender systems
Movie lens recommender systems
 
Recommendation system
Recommendation systemRecommendation system
Recommendation system
 
Project presentation
Project presentationProject presentation
Project presentation
 
Visual Basic User Interface -IV
Visual Basic User Interface -IVVisual Basic User Interface -IV
Visual Basic User Interface -IV
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
 
Mutable and immutable classes
Mutable and  immutable classesMutable and  immutable classes
Mutable and immutable classes
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
 
[UMAP 2016] User-Oriented Context Suggestion
[UMAP 2016] User-Oriented Context Suggestion[UMAP 2016] User-Oriented Context Suggestion
[UMAP 2016] User-Oriented Context Suggestion
 
Collaborative filtering at scale
Collaborative filtering at scaleCollaborative filtering at scale
Collaborative filtering at scale
 
[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation Approach
[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation Approach[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation Approach
[IUI 2017] Criteria Chains: A Novel Multi-Criteria Recommendation Approach
 
Accessing non static members from the main
Accessing non static members from the mainAccessing non static members from the main
Accessing non static members from the main
 
[Decisions2013@RecSys]The Role of Emotions in Context-aware Recommendation
[Decisions2013@RecSys]The Role of Emotions in Context-aware Recommendation[Decisions2013@RecSys]The Role of Emotions in Context-aware Recommendation
[Decisions2013@RecSys]The Role of Emotions in Context-aware Recommendation
 
[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware Personalization
[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware Personalization[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware Personalization
[EMPIRE 2016] Adapt to Emotional Reactions In Context-aware Personalization
 
Tweets Classifier
Tweets ClassifierTweets Classifier
Tweets Classifier
 
2.oop concept
2.oop concept2.oop concept
2.oop concept
 
CSTalks-Quaternary Semantics Recomandation System-24 Aug
CSTalks-Quaternary Semantics Recomandation System-24 AugCSTalks-Quaternary Semantics Recomandation System-24 Aug
CSTalks-Quaternary Semantics Recomandation System-24 Aug
 
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...
 
Collaborative Filtering using KNN
Collaborative Filtering using KNNCollaborative Filtering using KNN
Collaborative Filtering using KNN
 
Latent factor models for Collaborative Filtering
Latent factor models for Collaborative FilteringLatent factor models for Collaborative Filtering
Latent factor models for Collaborative Filtering
 
Rating System:Various rating algorithms Review.
Rating System:Various rating algorithms Review.Rating System:Various rating algorithms Review.
Rating System:Various rating algorithms Review.
 

Similar to Aaa ped-21-Recommender Systems: Content-based Filtering

Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...Rajasekar Nonburaj
 
Movie recommendation project
Movie recommendation projectMovie recommendation project
Movie recommendation projectAbhishek Jaisingh
 
Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...
Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...
Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...Kishor Datta Gupta
 
movierecommendationproject-171223181147.pptx
movierecommendationproject-171223181147.pptxmovierecommendationproject-171223181147.pptx
movierecommendationproject-171223181147.pptxAryanVyawahare
 
Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation SystemsRobin Reni
 
powerpoint presentation on movie recommender system.
powerpoint presentation on movie recommender system.powerpoint presentation on movie recommender system.
powerpoint presentation on movie recommender system.amanpandey7656
 
Recommendation engines
Recommendation enginesRecommendation engines
Recommendation enginesGeorgian Micsa
 
Recommender Systems from A to Z – The Right Dataset
Recommender Systems from A to Z – The Right DatasetRecommender Systems from A to Z – The Right Dataset
Recommender Systems from A to Z – The Right DatasetCrossing Minds
 
Recommenders Systems
Recommenders SystemsRecommenders Systems
Recommenders SystemsTariq Hassan
 
Summer internship 2014 report by Rishabh Misra, Thapar University
Summer internship 2014 report by Rishabh Misra, Thapar UniversitySummer internship 2014 report by Rishabh Misra, Thapar University
Summer internship 2014 report by Rishabh Misra, Thapar UniversityRishabh Misra
 
IntroductionRecommenderSystems_Petroni.pdf
IntroductionRecommenderSystems_Petroni.pdfIntroductionRecommenderSystems_Petroni.pdf
IntroductionRecommenderSystems_Petroni.pdfAlphaIssaghaDiallo
 
Movie recommendation Engine using Artificial Intelligence
Movie recommendation Engine using Artificial IntelligenceMovie recommendation Engine using Artificial Intelligence
Movie recommendation Engine using Artificial IntelligenceHarivamshi D
 
Movie Recommender System Using Artificial Intelligence
Movie Recommender System Using Artificial Intelligence Movie Recommender System Using Artificial Intelligence
Movie Recommender System Using Artificial Intelligence Shrutika Oswal
 
Recommender systems
Recommender systemsRecommender systems
Recommender systemsTamer Rezk
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemMilind Gokhale
 
Movie lens movie recommendation system
Movie lens movie recommendation systemMovie lens movie recommendation system
Movie lens movie recommendation systemGaurav Sawant
 

Similar to Aaa ped-21-Recommender Systems: Content-based Filtering (20)

Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
Building a Recommender systems by Vivek Murugesan - Technical Architect at Cr...
 
Movie recommendation project
Movie recommendation projectMovie recommendation project
Movie recommendation project
 
Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...
Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...
Deep Reinforcement Learning based Recommendation with Explicit User-ItemInter...
 
movierecommendationproject-171223181147.pptx
movierecommendationproject-171223181147.pptxmovierecommendationproject-171223181147.pptx
movierecommendationproject-171223181147.pptx
 
Recommendation Systems
Recommendation SystemsRecommendation Systems
Recommendation Systems
 
powerpoint presentation on movie recommender system.
powerpoint presentation on movie recommender system.powerpoint presentation on movie recommender system.
powerpoint presentation on movie recommender system.
 
Recommendation engines
Recommendation enginesRecommendation engines
Recommendation engines
 
Recommender Systems from A to Z – The Right Dataset
Recommender Systems from A to Z – The Right DatasetRecommender Systems from A to Z – The Right Dataset
Recommender Systems from A to Z – The Right Dataset
 
Recommenders Systems
Recommenders SystemsRecommenders Systems
Recommenders Systems
 
Summer internship 2014 report by Rishabh Misra, Thapar University
Summer internship 2014 report by Rishabh Misra, Thapar UniversitySummer internship 2014 report by Rishabh Misra, Thapar University
Summer internship 2014 report by Rishabh Misra, Thapar University
 
IntroductionRecommenderSystems_Petroni.pdf
IntroductionRecommenderSystems_Petroni.pdfIntroductionRecommenderSystems_Petroni.pdf
IntroductionRecommenderSystems_Petroni.pdf
 
Movie recommendation Engine using Artificial Intelligence
Movie recommendation Engine using Artificial IntelligenceMovie recommendation Engine using Artificial Intelligence
Movie recommendation Engine using Artificial Intelligence
 
Movie Recommender System Using Artificial Intelligence
Movie Recommender System Using Artificial Intelligence Movie Recommender System Using Artificial Intelligence
Movie Recommender System Using Artificial Intelligence
 
Recommender systems
Recommender systemsRecommender systems
Recommender systems
 
Collaborative Filtering Recommendation System
Collaborative Filtering Recommendation SystemCollaborative Filtering Recommendation System
Collaborative Filtering Recommendation System
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Filtering content bbased crs
Filtering content bbased crsFiltering content bbased crs
Filtering content bbased crs
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
 
Movie lens movie recommendation system
Movie lens movie recommendation systemMovie lens movie recommendation system
Movie lens movie recommendation system
 

More from AminaRepo

Aaa ped-23-Artificial Neural Network: Keras and Tensorfow
Aaa ped-23-Artificial Neural Network: Keras and TensorfowAaa ped-23-Artificial Neural Network: Keras and Tensorfow
Aaa ped-23-Artificial Neural Network: Keras and TensorfowAminaRepo
 
Aaa ped-22-Artificial Neural Network: Introduction to ANN
Aaa ped-22-Artificial Neural Network: Introduction to ANNAaa ped-22-Artificial Neural Network: Introduction to ANN
Aaa ped-22-Artificial Neural Network: Introduction to ANNAminaRepo
 
Aaa ped-20-Recommender Systems: Model-based collaborative filtering
Aaa ped-20-Recommender Systems: Model-based collaborative filteringAaa ped-20-Recommender Systems: Model-based collaborative filtering
Aaa ped-20-Recommender Systems: Model-based collaborative filteringAminaRepo
 
Aaa ped-18-Unsupervised Learning: Association Rule Learning
Aaa ped-18-Unsupervised Learning: Association Rule LearningAaa ped-18-Unsupervised Learning: Association Rule Learning
Aaa ped-18-Unsupervised Learning: Association Rule LearningAminaRepo
 
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAminaRepo
 
Aaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clusteringAaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clusteringAminaRepo
 
Aaa ped-15-Ensemble Learning: Random Forests
Aaa ped-15-Ensemble Learning: Random ForestsAaa ped-15-Ensemble Learning: Random Forests
Aaa ped-15-Ensemble Learning: Random ForestsAminaRepo
 
Aaa ped-14-Ensemble Learning: About Ensemble Learning
Aaa ped-14-Ensemble Learning: About Ensemble LearningAaa ped-14-Ensemble Learning: About Ensemble Learning
Aaa ped-14-Ensemble Learning: About Ensemble LearningAminaRepo
 
Aaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes Classifer
Aaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes ClassiferAaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes Classifer
Aaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes ClassiferAminaRepo
 
Aaa ped-11-Supervised Learning: Multivariable Regressor & Classifers
Aaa ped-11-Supervised Learning: Multivariable Regressor & ClassifersAaa ped-11-Supervised Learning: Multivariable Regressor & Classifers
Aaa ped-11-Supervised Learning: Multivariable Regressor & ClassifersAminaRepo
 
Aaa ped-10-Supervised Learning: Introduction to Supervised Learning
Aaa ped-10-Supervised Learning: Introduction to Supervised LearningAaa ped-10-Supervised Learning: Introduction to Supervised Learning
Aaa ped-10-Supervised Learning: Introduction to Supervised LearningAminaRepo
 
Aaa ped-9-Data manipulation: Time Series & Geographical visualization
Aaa ped-9-Data manipulation: Time Series & Geographical visualizationAaa ped-9-Data manipulation: Time Series & Geographical visualization
Aaa ped-9-Data manipulation: Time Series & Geographical visualizationAminaRepo
 
Aaa ped-Data-8- manipulation: Plotting and Visualization
Aaa ped-Data-8- manipulation: Plotting and VisualizationAaa ped-Data-8- manipulation: Plotting and Visualization
Aaa ped-Data-8- manipulation: Plotting and VisualizationAminaRepo
 
Aaa ped-8- Data manipulation: Data wrangling, aggregation, and group operations
Aaa ped-8- Data manipulation: Data wrangling, aggregation, and group operationsAaa ped-8- Data manipulation: Data wrangling, aggregation, and group operations
Aaa ped-8- Data manipulation: Data wrangling, aggregation, and group operationsAminaRepo
 
Aaa ped-6-Data manipulation: Data Files, and Data Cleaning & Preparation
Aaa ped-6-Data manipulation:  Data Files, and Data Cleaning & PreparationAaa ped-6-Data manipulation:  Data Files, and Data Cleaning & Preparation
Aaa ped-6-Data manipulation: Data Files, and Data Cleaning & PreparationAminaRepo
 
Aaa ped-5-Data manipulation: Pandas
Aaa ped-5-Data manipulation: Pandas Aaa ped-5-Data manipulation: Pandas
Aaa ped-5-Data manipulation: Pandas AminaRepo
 
Aaa ped-4- Data manipulation: Numpy
Aaa ped-4- Data manipulation: Numpy Aaa ped-4- Data manipulation: Numpy
Aaa ped-4- Data manipulation: Numpy AminaRepo
 
Aaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced conceptsAaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced conceptsAminaRepo
 
Aaa ped-2- Python: Basics
Aaa ped-2- Python: BasicsAaa ped-2- Python: Basics
Aaa ped-2- Python: BasicsAminaRepo
 
Aaa ped-1- Python: Introduction to AI, Python and Colab
Aaa ped-1- Python: Introduction to AI, Python and ColabAaa ped-1- Python: Introduction to AI, Python and Colab
Aaa ped-1- Python: Introduction to AI, Python and ColabAminaRepo
 

More from AminaRepo (20)

Aaa ped-23-Artificial Neural Network: Keras and Tensorfow
Aaa ped-23-Artificial Neural Network: Keras and TensorfowAaa ped-23-Artificial Neural Network: Keras and Tensorfow
Aaa ped-23-Artificial Neural Network: Keras and Tensorfow
 
Aaa ped-22-Artificial Neural Network: Introduction to ANN
Aaa ped-22-Artificial Neural Network: Introduction to ANNAaa ped-22-Artificial Neural Network: Introduction to ANN
Aaa ped-22-Artificial Neural Network: Introduction to ANN
 
Aaa ped-20-Recommender Systems: Model-based collaborative filtering
Aaa ped-20-Recommender Systems: Model-based collaborative filteringAaa ped-20-Recommender Systems: Model-based collaborative filtering
Aaa ped-20-Recommender Systems: Model-based collaborative filtering
 
Aaa ped-18-Unsupervised Learning: Association Rule Learning
Aaa ped-18-Unsupervised Learning: Association Rule LearningAaa ped-18-Unsupervised Learning: Association Rule Learning
Aaa ped-18-Unsupervised Learning: Association Rule Learning
 
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
 
Aaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clusteringAaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clustering
 
Aaa ped-15-Ensemble Learning: Random Forests
Aaa ped-15-Ensemble Learning: Random ForestsAaa ped-15-Ensemble Learning: Random Forests
Aaa ped-15-Ensemble Learning: Random Forests
 
Aaa ped-14-Ensemble Learning: About Ensemble Learning
Aaa ped-14-Ensemble Learning: About Ensemble LearningAaa ped-14-Ensemble Learning: About Ensemble Learning
Aaa ped-14-Ensemble Learning: About Ensemble Learning
 
Aaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes Classifer
Aaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes ClassiferAaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes Classifer
Aaa ped-12-Supervised Learning: Support Vector Machines & Naive Bayes Classifer
 
Aaa ped-11-Supervised Learning: Multivariable Regressor & Classifers
Aaa ped-11-Supervised Learning: Multivariable Regressor & ClassifersAaa ped-11-Supervised Learning: Multivariable Regressor & Classifers
Aaa ped-11-Supervised Learning: Multivariable Regressor & Classifers
 
Aaa ped-10-Supervised Learning: Introduction to Supervised Learning
Aaa ped-10-Supervised Learning: Introduction to Supervised LearningAaa ped-10-Supervised Learning: Introduction to Supervised Learning
Aaa ped-10-Supervised Learning: Introduction to Supervised Learning
 
Aaa ped-9-Data manipulation: Time Series & Geographical visualization
Aaa ped-9-Data manipulation: Time Series & Geographical visualizationAaa ped-9-Data manipulation: Time Series & Geographical visualization
Aaa ped-9-Data manipulation: Time Series & Geographical visualization
 
Aaa ped-Data-8- manipulation: Plotting and Visualization
Aaa ped-Data-8- manipulation: Plotting and VisualizationAaa ped-Data-8- manipulation: Plotting and Visualization
Aaa ped-Data-8- manipulation: Plotting and Visualization
 
Aaa ped-8- Data manipulation: Data wrangling, aggregation, and group operations
Aaa ped-8- Data manipulation: Data wrangling, aggregation, and group operationsAaa ped-8- Data manipulation: Data wrangling, aggregation, and group operations
Aaa ped-8- Data manipulation: Data wrangling, aggregation, and group operations
 
Aaa ped-6-Data manipulation: Data Files, and Data Cleaning & Preparation
Aaa ped-6-Data manipulation:  Data Files, and Data Cleaning & PreparationAaa ped-6-Data manipulation:  Data Files, and Data Cleaning & Preparation
Aaa ped-6-Data manipulation: Data Files, and Data Cleaning & Preparation
 
Aaa ped-5-Data manipulation: Pandas
Aaa ped-5-Data manipulation: Pandas Aaa ped-5-Data manipulation: Pandas
Aaa ped-5-Data manipulation: Pandas
 
Aaa ped-4- Data manipulation: Numpy
Aaa ped-4- Data manipulation: Numpy Aaa ped-4- Data manipulation: Numpy
Aaa ped-4- Data manipulation: Numpy
 
Aaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced conceptsAaa ped-3. Pythond: advanced concepts
Aaa ped-3. Pythond: advanced concepts
 
Aaa ped-2- Python: Basics
Aaa ped-2- Python: BasicsAaa ped-2- Python: Basics
Aaa ped-2- Python: Basics
 
Aaa ped-1- Python: Introduction to AI, Python and Colab
Aaa ped-1- Python: Introduction to AI, Python and ColabAaa ped-1- Python: Introduction to AI, Python and Colab
Aaa ped-1- Python: Introduction to AI, Python and Colab
 

Recently uploaded

STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxAleenaTreesaSaji
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physicsvishikhakeshava1
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptMAESTRELLAMesa2
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxpradhanghanshyam7136
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 

Recently uploaded (20)

STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptx
 
Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physics
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.ppt
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptx
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 

Aaa ped-21-Recommender Systems: Content-based Filtering

  • 2. Plan ● 1- Introduction ● 2- Content Based Filtering with Decision Trees ● 3- User profles Learning with Decision Trees ● 4- Make predictions with the decision tree ● 5- Nearest Neighbor Method ● 6- Polynomial Regression
  • 3. 3 1-Introduction [By Amina Delali] ConceptConcept ● As said in [Francesco et al., 2011], Content Based recommendation systems try to recommend items similar to those a given user has liked in the past. ● The recommendation for an item to a user is based on the actual features that this item has. And, on actual feedback and reviews that this user has already done. ● The system is build around 3 components: ➢ The item description: each item is described by a set of attributes (features) ➢ The user profle: each user is described by a model generated from the features of the items rated by that user ➢ A matching strategy: how to match up the user’s profle attributes with an item attributes
  • 4. 4 1-Introduction [By Amina Delali] ProcessProcess Analyze content Learn users profiles Build a filtering component We preprocess the data to construct a structured items description We use the users preferences for items to construct a user profile We use the user profile to recommend new items by matching the representation of the user’s profile with the representation of the new items. Feedback of the user on these recommendations are used to enhance the user profile.
  • 5. 5 1-Introduction [By Amina Delali] Learning User ProflesLearning User Profles ● Diferent approaches exist to construct a user profle. They are based on techniques of text classifcation: ➢ Probabilistic methods and Naive Bayes: a probabilistic text classifcation approach based on the Naive Bayesian Classifer (see Week4 lesson 3 for more details) ➢ Rocchio’s algorithm: is a relevant feedback algorithm. It refnes the recommendations by using the feedback of users on these recommendation. The update process takes into account relevant and non relevant recommended items. ➢ Decision Trees Classifer (see Week5 lesson 1) ➢ Nearest neighbors algorithm (this week, lesson 1) ➢ Linear Classifers (week 4 lessons)
  • 6. 6 2-ContentBased Filteringwith DecisionTrees [By Amina Delali] ConceptConcept ● Each user profle will be represented by a Decision Tree Classifer. The tree will learn from the description of items he already reviewed ● The labels will be the ratings (or like and dislike) the user had given to these items. ● The resulting Tree will later used to: ➢ predict the review (rating) of a new item. ➢ make a list of recommendations to that user based on the predictions on a list of items.
  • 7. 7 2-ContentBased Filteringwith DecisionTrees [By Amina Delali] Items DescriptionItems Description ● In general, the items are described by text. So, in order to use them, we have to vectorize our text data. (See week 4 lesson1) ● We will built a movie recommender for one user, using the data available at: The Movies Dataset | Kaggle The file contain a description for 45466 movies in 24 columns
  • 8. 8 2-ContentBased Filteringwith DecisionTrees [By Amina Delali] The LabelsThe Labels ● We will use the ratings that users gave to these movies as labels. ● We will select only the ratings made by the user with the id_user = 2 The data contains 1000004 ratings
  • 9. 9 3-UserproflesLearning withDecisionTrees [By Amina Delali] Preparing the DataPreparing the Data ● In this phase we will merge the ratings done by the user 2 with the description of the movies he rated. (More details about merging operations are available in week 3 lesson 1) The id type in the user dataframe was int, and in the movies dataframe , it was a string. So , we had to convert one of them before making the merge
  • 10. 10 3-UserproflesLearning withDecisionTrees [By Amina Delali] Extracting FeaturesExtracting Features ● We will user only the overview of the movie as description attribute. The rating is for the classification labels We apply a TF-IDF transform ation on the overview attribute Words available in the overviews
  • 11. 11 3-UserproflesLearning withDecisionTrees [By Amina Delali] Learning the User’s ProfleLearning the User’s Profle ● The tree representing the user’s model
  • 12. 12 4-Makepredictions withthedecisiontree [By Amina Delali] Not rated moviesNot rated movies ● We have to create the list of the movies that the user 2 didn't rate. Then we will select only 30 movies. ● We have also to select only the features represented in the user's profle. We selected only 30 movies for memory issues
  • 13. 13 4-Makepredictions withthedecisiontree [By Amina Delali] Not rated movies (suite)Not rated movies (suite) ● The items description used for the prediction must: ● Contain the same features as those used by tree classifier to model the user’s profile ● The features must be ordered the same way.
  • 14. 14 4-Makepredictions withthedecisiontree [By Amina Delali] Make predictionsMake predictions ● We will make predictions for the frst 30 movies in myX2. ● Then, we will sort these predictions, and select the 10 frst ratings Since we didn’t change the order of the rows of the dataframe corresponding to the “not rated” movies ‘myDFnotB2) , and since we selected only the first elements sequentially, the order the predictions array and the myDFnotB2 frame is the same.
  • 15. 15 5-NearestNeighbor Method [By Amina Delali] ConceptConcept ● After preparing the descriptions of the items rated by one user. And in order to predict a review on a new item (by that user): ➢ Compute the similarity between the new item and all the rated item ➢ ➢ Select the nearest or the k nearest neighbors items using the computed similarities ➢ aggregate the ratings of the selected items. ● In the case of vectorized text attributes, the cosine similarity measure could be used.
  • 16. 16 5-NearestNeighbor Method [By Amina Delali] Compute similaritiesCompute similarities ● We will select one item from the not rated items (of the previous section), then we will compute its cosine similarities with all the movies rated by the user 2
  • 17. 17 5-NearestNeighbor Method [By Amina Delali] Make predictionsMake predictions ●
  • 18. References ● [Francesco et al., 2011] Francesco, R., Lior, R., Bracha, S., and Paul B., K., editors (2011). Recommender Systems Handbook. Springer Science+Business Media. ● [Kaggle, ] Kaggle. The movies dataset. https://www.kaggle.com/rounakbanik/the-movies-dataset. ● [Pazzani and Billsus, 2007] Pazzani, M. J. and Billsus, D. (2007). Content-based recommendation systems. In The adaptive web, pages 325–341. Springer