SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
Silpa
 
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
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
1301aanya
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptx
Silpa
 

Dernier (20)

Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRingsTransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
GBSN - Biochemistry (Unit 2) Basic concept of organic chemistry
 
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICEPATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
 
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
 
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLGwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
 
Dr. E. Muralinath_ Blood indices_clinical aspects
Dr. E. Muralinath_ Blood indices_clinical  aspectsDr. E. Muralinath_ Blood indices_clinical  aspects
Dr. E. Muralinath_ Blood indices_clinical aspects
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
Chemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdfChemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdf
 
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
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx
 
CYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptxCYTOGENETIC MAP................ ppt.pptx
CYTOGENETIC MAP................ ppt.pptx
 

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