SlideShare a Scribd company logo
1 of 35
Raccomender engines
Index
• Content based
Its approaches utilize a series of discrete characteristics of an item in
order to recommend additional items with similar properties.
• Collaborative filtering
Its approaches building a model from a user's past behavior (items
previously purchased or selected and/or numerical ratings given to
those items) as well as similar decisions made by other users. This
model is then used to predict items (or ratings for items) that the user
may have an interest in.
Content based
Content-based filtering, also referred to as cognitive filtering, recommends items
based on a comparison between the content of the items and a user profile.
Movie Katie Tom Luis Jenny
Titanic 5 ? 1 ?
Lovers 5 ? 1 5
Rambo ? 5 5 1
Rocky 0 5 4 ?
Romance 1 0 ? ?
Movie Katie Tom Luis Jenny
Titanic 5 ? 1 ?
Lovers 5 ? 1 5
Rambo ? 5 5 1
Rocky 0 5 4 ?
Romance 1 0 ? ?
Movie Katie Tom Luis Jenny Love Action
Titanic 5 ? 1 ? 0,7 0,5
Lovers 5 ? 1 5 1 0,5
Rambo ? 5 5 1 0 1
Rocky 0 5 4 ? 0,2 1,02
Romance 1 0 ? ? 1 0
Movie Katie Tom Luis Jenny Love Action
Titanic 5 ? 1 ? 0,7 0,5
Lovers 5 ? 1 5 1 0,5
Rambo ? 5 5 1 0 1
Rocky 0 5 4 ? 0,2 1,02
Romance 1 0 ? ? 1 0
Movie
Katie
θ(1)
Tom
θ(2)
Luis
θ(3)
Jenny
θ(4)
Love
x1
Action
x2
Titanic
x(1)
5 ? 1 ? 0,7 0,5
Lovers
x(2)
5 ? 1 5 1 0,5
Rambo
x(3)
? 5 5 1 0 1
Rocky
x(4)
0 5 4 ? 0,2 1,02
Romance
x(5)
1 0 ? ? 1 0
nu = 4 number of users
nm = 5 number of movies
f = 2 number of features
𝑥0 = 1 bias
𝑥(1) = [ 𝑥0 𝑥1 𝑥2 ]' = [ 1 0,7 0,5 ]' Movie features
𝑥(2) = [ 1 1 0,5 ]'
𝑥(3) = [ 1 0 1 ]'
𝑥(4) = [ 1 0,2 1,02 ]'
𝑥(5) = [ 1 1 0 ]'
For each user j, learn a parameter θ(j) ∈ ℝ3.
Predict user j as rating movie i with (θ(j))' 𝑥(i)
Movie
Katie
θ(1)
Tom
θ(2)
Luis
θ(3)
Jenny
θ(4)
Love
x1
Action
x2
Titanic
x(1)
5 ? 1 ? 0,7 0,5
Lovers
x(2)
5 ? 1 5 1 0,5
Rambo
x(3)
? 5 5 1 0 1
Rocky
x(4)
0 5 4 ? 0,2 1,02
Romance
x(5)
1 0 ? ? 1 0
For each user j, learn a parameter θ(j) ∈ ℝ3.
Predict user j as rating movie i with (θ(j))' 𝑥(i)
θ(1) = [ 0 5 1 ]' User n.1
𝑥(3) = [ 1 0 1 ]' Movie n.3
User 1 gives to movie 3: 0×1 + 5×0 + 1×1 = 1 ✭
Compute θ(j) ,basically, it's a linear regression problem.
r(i,j) = 1 when user i rated movie j, 0 elsewhere
x(i) movie i feature vector
y(i,j) user i rating for movie j if set
n number of movies
m number of users
Learn θ(j) ( user j profile )
min
θ
( 𝑗) = 0.5 ∑i:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑k=1..n (θ(j)
k)2
Learn θ(1) ... θ(m) ( for every user )
min
θ
(1)
... θ
(m) = 0.5 ∑ j=1..m ∑i:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 +
0.5 λ ∑j=1..m ∑k=1..n (θ(j)
k)2
𝑥 → θ
• Cost is minimized on the single user preferences.
• User's profile depends on the product features.
Movie
Katie
θ(1)
Tom
θ(2)
Luis
θ(3)
Jenny
θ(4)
Love
x1
Action
x2
Titanic
x(1)
5 ? 1 ? 0,7 0,5
Lovers
x(2)
5 ? 1 5 1 0,5
Rambo
x(3)
1 5 5 1 0 1
Rocky
x(4)
0 5 4 ? 0,2 1,02
Romance
x(5)
1 0 ? ? 1 0
Similar
Raccomandation
depends on
choices made on
similar products
Collaborative Filtering
predictions (filtering) about the interests of a user by
collecting preferences or taste information from many users
The underlying assumption of the collaborative filtering approach is that if a
person A has the same opinion as a person B on an issue, A is more likely
to have B's opinion on a different issue x than to have the opinion on x of a
person chosen randomly.
Women often exclaim,
"All men are the same!"
Are we all the same ?
• Yes, we are.
• 16 base types
• 4 cognitive functions
Extraversion/Introversion,
INtuiting/Sensing,
Thinking/Feeling,
Perceiving/Judging.
Movie
Katie
θ(1)
Tom
θ(2)
Luis
θ(3)
Jenny
θ(4) x1 ... xf
Titanic
x(1)
5 0 0 5 ? ... ?
Lovers
x(2)
5 ? 1 5 ? ... ?
Rambo
x(3)
? 5 5 1 ? ... ?
Rocky
x(4)
0 5 4 ? ? ... ?
Romance
x(5)
1 0 ? ? ? ... ?
Movie
Katie
θ(1)
Tom
θ(2)
Luis
θ(3)
Jenny
θ(4) x1 x2
Titanic
x(1)
5 0 0 5 ? ?
Lovers
x(2)
5 ? 0 5 ? ?
Rambo
x(3)
? 5 5 1 ? ?
Rocky
x(4)
0 5 4 ? ? ?
Romance
x(5)
1 0 ? ? ? ?
Suppose to have the users' profiles
θ(1) = [ 0 5 0 ]'
θ(2) = [ 0 0 5 ]'
θ(3) = [ 0 0 5 ]'
θ(4) = [ 0 5 0 ]'
then 𝑥(1) (1st movie features vector) is something that must
satisfy
(θ(1))'𝑥(1) = 5
(θ(2))'𝑥(1) = 0
(θ(3))'𝑥(1) = 0
(θ(4))'𝑥(1) = 5 ⇒ 𝑥(1) = [ 1 1 0]'
θ(1) = [ 0 5 0 ]'
θ(2) = [ 0 0 5 ]'
θ(3) = [ 0 0 5 ]'
θ(4) = [ 0 5 0 ]'
then 𝑥(2) (2nd movie features vector) is something that
must satisfy
(θ(1))'𝑥(2) = 5
(θ(3))'𝑥(2) = 0
(θ(4))'𝑥(2) = 5
and so on...
⇒ 𝑥(2) = [ 1 1 0]'
Suppose to have the
users' profiles
From θ(1) ... θ(m) learn 𝑥(i) ( movie i features )
min
𝑥
(i) = 0.5 ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑k=1..p (𝑥(i)
k)2
From θ(1) ... θ(m) learn 𝑥(1) ... 𝑥(n)( movies features )
min 𝑥(1)
... 𝑥(n) = 0.5 ∑ j=1..n ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 +
0.5 λ ∑j=1..n ∑k=1..p (𝑥(j)
k)2
θ → 𝑥
• Product's features depend on users' profiles
θ and 𝑥 with small random values then ite
θ → 𝑥 → θ → 𝑥 → θ → 𝑥 ...
From θ(1) ... θ(m), estimate 𝑥(1) ... 𝑥(n)
min 𝑥(1)
... 𝑥(n) = 0.5 ∑ j=1..n ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 +
0.5 λ ∑j=1..n ∑k=1..n (𝑥(j)
k)2
Given 𝑥(1) ... 𝑥(n), estimate θ(1) ... θ(m)
min
θ
(1)
... θ
(m) = 0.5 ∑ j=1..m ∑i:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 +
0.5 λ ∑j=1..m ∑k=1..n (θ(j)
k)2
Minimizing θ(1) ... θ(m), 𝑥(1) ... 𝑥(n) simultaneously:
min 𝑥(1)
... 𝑥(n),
θ
(1)
... θ
(m) =
0.5 ∑ j=1..n ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 +
0.5 λ ∑j=1..n ∑k=1..n (𝑥(j)
k)2 +
0.5 λ ∑j=1..m ∑k=1..n (θ(j)
k)2
1. Product's features depend on all users ratings
2. User's profile depends on product's features
3. 1),2) ⇒ User's profile depents on all users ratings
4. Similar products depends on users' ratings and users'
profiles
5. Similar user profiles are defined by similar products
Movie
Katie
θ(1)
Tom
θ(2)
Luis
θ(3)
Jenny
θ(4) x1 x2
Lovers
x(2)
5 0,0003 0 5 0,97 0,04
Titanic
x(1)
5 0 0 5 1,01 0,001
Rambo
x(3)
0,0002 5 5 1 0,02 0,87
Rocky
x(4)
0 5 4 0,0054 0,001 0,98
Romance
x(5)
5 0 0,01 4,98 0,89 0,05
OMFG LIVE DEMO TIME
Be prerared for it to fails, because demos always do
Raccomender engines

More Related Content

Viewers also liked (11)

Sistem kardiovaskular
Sistem kardiovaskularSistem kardiovaskular
Sistem kardiovaskular
 
6.7 sistem respiratori
6.7 sistem respiratori6.7 sistem respiratori
6.7 sistem respiratori
 
Sistem respirasi
Sistem respirasiSistem respirasi
Sistem respirasi
 
Anatomi dan Fisiologi Sistem Kardiovaskuler
Anatomi dan Fisiologi Sistem KardiovaskulerAnatomi dan Fisiologi Sistem Kardiovaskuler
Anatomi dan Fisiologi Sistem Kardiovaskuler
 
Pencegahan infeksi
Pencegahan infeksiPencegahan infeksi
Pencegahan infeksi
 
(3) Anatomi & fisiologi sistem pernafasan
(3) Anatomi & fisiologi sistem pernafasan(3) Anatomi & fisiologi sistem pernafasan
(3) Anatomi & fisiologi sistem pernafasan
 
Anatomi Fisiologi Sistem Kardiovaskuler
Anatomi Fisiologi Sistem KardiovaskulerAnatomi Fisiologi Sistem Kardiovaskuler
Anatomi Fisiologi Sistem Kardiovaskuler
 
Pengantar Mikrobiologi
Pengantar MikrobiologiPengantar Mikrobiologi
Pengantar Mikrobiologi
 
Pra konsepsi konsepsi kehamilan
Pra konsepsi konsepsi kehamilanPra konsepsi konsepsi kehamilan
Pra konsepsi konsepsi kehamilan
 
Persalinan dan nifas
Persalinan dan nifasPersalinan dan nifas
Persalinan dan nifas
 
Anatomi dan fisiologi sel
Anatomi dan fisiologi selAnatomi dan fisiologi sel
Anatomi dan fisiologi sel
 

Similar to Raccomender engines

Speaker pham cong dinh
Speaker pham cong dinhSpeaker pham cong dinh
Speaker pham cong dinh
AiTi Education
 
Windy City DB - Recommendation Engine with Neo4j
Windy City DB - Recommendation Engine with Neo4jWindy City DB - Recommendation Engine with Neo4j
Windy City DB - Recommendation Engine with Neo4j
Max De Marzi
 
movieRecommendation_FinalReport
movieRecommendation_FinalReportmovieRecommendation_FinalReport
movieRecommendation_FinalReport
Sohini Sarkar
 

Similar to Raccomender engines (20)

Project Management IMDB
Project Management IMDBProject Management IMDB
Project Management IMDB
 
Recommendation Engine with In-Database Machine Learning
Recommendation Engine with In-Database Machine LearningRecommendation Engine with In-Database Machine Learning
Recommendation Engine with In-Database Machine Learning
 
C3_W2.pdf
C3_W2.pdfC3_W2.pdf
C3_W2.pdf
 
Collaborative Filtering Recommender Based on Co-occurrence Matrix
Collaborative Filtering Recommender Based on Co-occurrence MatrixCollaborative Filtering Recommender Based on Co-occurrence Matrix
Collaborative Filtering Recommender Based on Co-occurrence Matrix
 
Recommender Systems, Matrices and Graphs
Recommender Systems, Matrices and GraphsRecommender Systems, Matrices and Graphs
Recommender Systems, Matrices and Graphs
 
Recommendation System Explained
Recommendation System ExplainedRecommendation System Explained
Recommendation System Explained
 
Lecture16
Lecture16Lecture16
Lecture16
 
Introduction to Recommender System
Introduction to Recommender SystemIntroduction to Recommender System
Introduction to Recommender System
 
Speaker pham cong dinh
Speaker pham cong dinhSpeaker pham cong dinh
Speaker pham cong dinh
 
Movie Recommendation System - MovieLens Dataset
Movie Recommendation System - MovieLens DatasetMovie Recommendation System - MovieLens Dataset
Movie Recommendation System - MovieLens Dataset
 
Finding more people like you
Finding more people like youFinding more people like you
Finding more people like you
 
IJCAI 2015 Presentation: Did you know?- Mining Interesting Trivia for Entitie...
IJCAI 2015 Presentation: Did you know?- Mining Interesting Trivia for Entitie...IJCAI 2015 Presentation: Did you know?- Mining Interesting Trivia for Entitie...
IJCAI 2015 Presentation: Did you know?- Mining Interesting Trivia for Entitie...
 
Graph Gurus Episode 2: Building a Movie Recommendation Engine
Graph Gurus Episode 2: Building a Movie Recommendation EngineGraph Gurus Episode 2: Building a Movie Recommendation Engine
Graph Gurus Episode 2: Building a Movie Recommendation Engine
 
Windy City DB - Recommendation Engine with Neo4j
Windy City DB - Recommendation Engine with Neo4jWindy City DB - Recommendation Engine with Neo4j
Windy City DB - Recommendation Engine with Neo4j
 
Community detection recommender system
Community detection   recommender systemCommunity detection   recommender system
Community detection recommender system
 
Matrix Factorization
Matrix FactorizationMatrix Factorization
Matrix Factorization
 
movieRecommendation_FinalReport
movieRecommendation_FinalReportmovieRecommendation_FinalReport
movieRecommendation_FinalReport
 
Collaborative Filtering 1: User-based CF
Collaborative Filtering 1: User-based CFCollaborative Filtering 1: User-based CF
Collaborative Filtering 1: User-based CF
 
Deep learning
Deep learningDeep learning
Deep learning
 
Collaborative Filtering 2: Item-based CF
Collaborative Filtering 2: Item-based CFCollaborative Filtering 2: Item-based CF
Collaborative Filtering 2: Item-based CF
 

Recently uploaded

COMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demeritsCOMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demerits
Cherry
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
levieagacer
 
Pteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecyclePteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecycle
Cherry
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
Scintica Instrumentation
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.
Cherry
 
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cherry
 

Recently uploaded (20)

Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
 
Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptx
 
GBSN - Biochemistry (Unit 3) Metabolism
GBSN - Biochemistry (Unit 3) MetabolismGBSN - Biochemistry (Unit 3) Metabolism
GBSN - Biochemistry (Unit 3) Metabolism
 
Role of AI in seed science Predictive modelling and Beyond.pptx
Role of AI in seed science  Predictive modelling and  Beyond.pptxRole of AI in seed science  Predictive modelling and  Beyond.pptx
Role of AI in seed science Predictive modelling and Beyond.pptx
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
GBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisGBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of Asepsis
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
COMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demeritsCOMPOSTING : types of compost, merits and demerits
COMPOSTING : types of compost, merits and demerits
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.
Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.
Genome Projects : Human, Rice,Wheat,E coli and Arabidopsis.
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptx
 
Taphonomy and Quality of the Fossil Record
Taphonomy and Quality of the  Fossil RecordTaphonomy and Quality of the  Fossil Record
Taphonomy and Quality of the Fossil Record
 
Module for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learningModule for Grade 9 for Asynchronous/Distance learning
Module for Grade 9 for Asynchronous/Distance learning
 
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxClimate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptx
 
Pteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecyclePteris : features, anatomy, morphology and lifecycle
Pteris : features, anatomy, morphology and lifecycle
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.
 
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.Cyathodium bryophyte: morphology, anatomy, reproduction etc.
Cyathodium bryophyte: morphology, anatomy, reproduction etc.
 

Raccomender engines

  • 2. Index • Content based Its approaches utilize a series of discrete characteristics of an item in order to recommend additional items with similar properties. • Collaborative filtering Its approaches building a model from a user's past behavior (items previously purchased or selected and/or numerical ratings given to those items) as well as similar decisions made by other users. This model is then used to predict items (or ratings for items) that the user may have an interest in.
  • 3. Content based Content-based filtering, also referred to as cognitive filtering, recommends items based on a comparison between the content of the items and a user profile.
  • 4. Movie Katie Tom Luis Jenny Titanic 5 ? 1 ? Lovers 5 ? 1 5 Rambo ? 5 5 1 Rocky 0 5 4 ? Romance 1 0 ? ?
  • 5. Movie Katie Tom Luis Jenny Titanic 5 ? 1 ? Lovers 5 ? 1 5 Rambo ? 5 5 1 Rocky 0 5 4 ? Romance 1 0 ? ?
  • 6. Movie Katie Tom Luis Jenny Love Action Titanic 5 ? 1 ? 0,7 0,5 Lovers 5 ? 1 5 1 0,5 Rambo ? 5 5 1 0 1 Rocky 0 5 4 ? 0,2 1,02 Romance 1 0 ? ? 1 0
  • 7. Movie Katie Tom Luis Jenny Love Action Titanic 5 ? 1 ? 0,7 0,5 Lovers 5 ? 1 5 1 0,5 Rambo ? 5 5 1 0 1 Rocky 0 5 4 ? 0,2 1,02 Romance 1 0 ? ? 1 0
  • 8. Movie Katie θ(1) Tom θ(2) Luis θ(3) Jenny θ(4) Love x1 Action x2 Titanic x(1) 5 ? 1 ? 0,7 0,5 Lovers x(2) 5 ? 1 5 1 0,5 Rambo x(3) ? 5 5 1 0 1 Rocky x(4) 0 5 4 ? 0,2 1,02 Romance x(5) 1 0 ? ? 1 0
  • 9. nu = 4 number of users nm = 5 number of movies f = 2 number of features 𝑥0 = 1 bias 𝑥(1) = [ 𝑥0 𝑥1 𝑥2 ]' = [ 1 0,7 0,5 ]' Movie features 𝑥(2) = [ 1 1 0,5 ]' 𝑥(3) = [ 1 0 1 ]' 𝑥(4) = [ 1 0,2 1,02 ]' 𝑥(5) = [ 1 1 0 ]' For each user j, learn a parameter θ(j) ∈ ℝ3. Predict user j as rating movie i with (θ(j))' 𝑥(i)
  • 10. Movie Katie θ(1) Tom θ(2) Luis θ(3) Jenny θ(4) Love x1 Action x2 Titanic x(1) 5 ? 1 ? 0,7 0,5 Lovers x(2) 5 ? 1 5 1 0,5 Rambo x(3) ? 5 5 1 0 1 Rocky x(4) 0 5 4 ? 0,2 1,02 Romance x(5) 1 0 ? ? 1 0
  • 11. For each user j, learn a parameter θ(j) ∈ ℝ3. Predict user j as rating movie i with (θ(j))' 𝑥(i) θ(1) = [ 0 5 1 ]' User n.1 𝑥(3) = [ 1 0 1 ]' Movie n.3 User 1 gives to movie 3: 0×1 + 5×0 + 1×1 = 1 ✭ Compute θ(j) ,basically, it's a linear regression problem.
  • 12. r(i,j) = 1 when user i rated movie j, 0 elsewhere x(i) movie i feature vector y(i,j) user i rating for movie j if set n number of movies m number of users Learn θ(j) ( user j profile ) min θ ( 𝑗) = 0.5 ∑i:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑k=1..n (θ(j) k)2 Learn θ(1) ... θ(m) ( for every user ) min θ (1) ... θ (m) = 0.5 ∑ j=1..m ∑i:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑j=1..m ∑k=1..n (θ(j) k)2
  • 13. 𝑥 → θ • Cost is minimized on the single user preferences. • User's profile depends on the product features.
  • 14. Movie Katie θ(1) Tom θ(2) Luis θ(3) Jenny θ(4) Love x1 Action x2 Titanic x(1) 5 ? 1 ? 0,7 0,5 Lovers x(2) 5 ? 1 5 1 0,5 Rambo x(3) 1 5 5 1 0 1 Rocky x(4) 0 5 4 ? 0,2 1,02 Romance x(5) 1 0 ? ? 1 0 Similar Raccomandation depends on choices made on similar products
  • 15.
  • 16. Collaborative Filtering predictions (filtering) about the interests of a user by collecting preferences or taste information from many users
  • 17. The underlying assumption of the collaborative filtering approach is that if a person A has the same opinion as a person B on an issue, A is more likely to have B's opinion on a different issue x than to have the opinion on x of a person chosen randomly. Women often exclaim, "All men are the same!"
  • 18. Are we all the same ? • Yes, we are. • 16 base types • 4 cognitive functions Extraversion/Introversion, INtuiting/Sensing, Thinking/Feeling, Perceiving/Judging.
  • 19.
  • 20.
  • 21. Movie Katie θ(1) Tom θ(2) Luis θ(3) Jenny θ(4) x1 ... xf Titanic x(1) 5 0 0 5 ? ... ? Lovers x(2) 5 ? 1 5 ? ... ? Rambo x(3) ? 5 5 1 ? ... ? Rocky x(4) 0 5 4 ? ? ... ? Romance x(5) 1 0 ? ? ? ... ?
  • 22. Movie Katie θ(1) Tom θ(2) Luis θ(3) Jenny θ(4) x1 x2 Titanic x(1) 5 0 0 5 ? ? Lovers x(2) 5 ? 0 5 ? ? Rambo x(3) ? 5 5 1 ? ? Rocky x(4) 0 5 4 ? ? ? Romance x(5) 1 0 ? ? ? ?
  • 23. Suppose to have the users' profiles θ(1) = [ 0 5 0 ]' θ(2) = [ 0 0 5 ]' θ(3) = [ 0 0 5 ]' θ(4) = [ 0 5 0 ]' then 𝑥(1) (1st movie features vector) is something that must satisfy (θ(1))'𝑥(1) = 5 (θ(2))'𝑥(1) = 0 (θ(3))'𝑥(1) = 0 (θ(4))'𝑥(1) = 5 ⇒ 𝑥(1) = [ 1 1 0]'
  • 24. θ(1) = [ 0 5 0 ]' θ(2) = [ 0 0 5 ]' θ(3) = [ 0 0 5 ]' θ(4) = [ 0 5 0 ]' then 𝑥(2) (2nd movie features vector) is something that must satisfy (θ(1))'𝑥(2) = 5 (θ(3))'𝑥(2) = 0 (θ(4))'𝑥(2) = 5 and so on... ⇒ 𝑥(2) = [ 1 1 0]' Suppose to have the users' profiles
  • 25. From θ(1) ... θ(m) learn 𝑥(i) ( movie i features ) min 𝑥 (i) = 0.5 ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑k=1..p (𝑥(i) k)2 From θ(1) ... θ(m) learn 𝑥(1) ... 𝑥(n)( movies features ) min 𝑥(1) ... 𝑥(n) = 0.5 ∑ j=1..n ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑j=1..n ∑k=1..p (𝑥(j) k)2
  • 26. θ → 𝑥 • Product's features depend on users' profiles
  • 27.
  • 28. θ and 𝑥 with small random values then ite θ → 𝑥 → θ → 𝑥 → θ → 𝑥 ...
  • 29. From θ(1) ... θ(m), estimate 𝑥(1) ... 𝑥(n) min 𝑥(1) ... 𝑥(n) = 0.5 ∑ j=1..n ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑j=1..n ∑k=1..n (𝑥(j) k)2 Given 𝑥(1) ... 𝑥(n), estimate θ(1) ... θ(m) min θ (1) ... θ (m) = 0.5 ∑ j=1..m ∑i:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑j=1..m ∑k=1..n (θ(j) k)2
  • 30. Minimizing θ(1) ... θ(m), 𝑥(1) ... 𝑥(n) simultaneously: min 𝑥(1) ... 𝑥(n), θ (1) ... θ (m) = 0.5 ∑ j=1..n ∑j:r(i,j)=1 ( (θ(j) )'𝑥(i) - 𝑦(i,j) )2 + 0.5 λ ∑j=1..n ∑k=1..n (𝑥(j) k)2 + 0.5 λ ∑j=1..m ∑k=1..n (θ(j) k)2
  • 31. 1. Product's features depend on all users ratings 2. User's profile depends on product's features 3. 1),2) ⇒ User's profile depents on all users ratings 4. Similar products depends on users' ratings and users' profiles 5. Similar user profiles are defined by similar products
  • 32. Movie Katie θ(1) Tom θ(2) Luis θ(3) Jenny θ(4) x1 x2 Lovers x(2) 5 0,0003 0 5 0,97 0,04 Titanic x(1) 5 0 0 5 1,01 0,001 Rambo x(3) 0,0002 5 5 1 0,02 0,87 Rocky x(4) 0 5 4 0,0054 0,001 0,98 Romance x(5) 5 0 0,01 4,98 0,89 0,05
  • 33.
  • 34. OMFG LIVE DEMO TIME Be prerared for it to fails, because demos always do