RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models....
Transcript of RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models....
![Page 1: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/1.jpg)
Recommender Systems
Carlos Carvalho, Mladen Kolar and Robert McCulloch
11/05/2015
![Page 2: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/2.jpg)
Tools so far
We already know many things that we can use to recommend newcontent.
I predict rating of a restaurantI predict if a user is going to respond to a marketing campaignI predict if user is going to like a music
![Page 3: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/3.jpg)
Why do we need recommendations?
Help users discover new content
![Page 4: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/4.jpg)
Why do we need recommendations?Help users find what they have been already looking for.
Prominently place content as a part of the user inerface.
![Page 5: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/5.jpg)
Why do we need recommendations?Help users find complementary products
![Page 6: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/6.jpg)
Why do we need recommendations?Help users find substitute products
![Page 7: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/7.jpg)
Why do we need recommendations?
Personalize user experience based on the feedback
Recommend products based on our interests
![Page 8: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/8.jpg)
Why do we need recommendations?Who to follow?
![Page 9: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/9.jpg)
Why do we need recommendations?
Help us find things we like
![Page 10: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/10.jpg)
Why do we need recommendations?
I Discover new contentI Help us find what we are looking forI Personalize content based on our feedback/interestsI Help us find things we likeI . . .
All of the above problems are slightly different from each other.
However, at the base of all of them is the need to modelpreferences, opinions and behaviour of users.
![Page 11: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/11.jpg)
Popularity
What are people viewingnow
Limitations
I no context (what is my intention now)I no personalization
![Page 12: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/12.jpg)
Predicting rating using existing models
Build a model using features of a user and an item
![Page 13: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/13.jpg)
Predicting rating using existing models
The Music Genome Projecthttps://www.pandora.com/about/mgp
... Each song in the Music Genome Project is analyzed using up to 450distinct musical characteristics by a trained music analyst. Theseattributes capture not only the musical identity of a song, but also themany significant qualities that are relevant to understanding the musicalpreferences of listeners. The typical music analyst working on the MusicGenome Project has a four-year degree in music theory, composition orperformance, has passed through a selective screening process and hascompleted intensive training in the Music Genome’s rigorous and precisemethodology. ...
![Page 14: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/14.jpg)
Predicting rating using existing models
Obtaining features may be expensive
![Page 15: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/15.jpg)
Predicting rating using existing models
Build a model using features of a user and an item
I linear modelI decision treeI boosting modelI . . .
rating = f (user features, item features)
![Page 16: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/16.jpg)
Predicting rating using existing models
We could predict how many stars a user would give.
We could predict whether a user would give a high rating if theypurchase an item.
We could predict whether a user will like an item.
Based on the predicted rating, the system would recommend
I diverse set of itemsI new/unseen contentI something that the user likes or searches for
![Page 17: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/17.jpg)
Predicting rating using existing models
We train a model based on user’s past feedback and various featuresthat characterize users and items.
Recommender system provides a rating and we providerecommendations based on this.
Similar to the example in marketing where customers are targetedbased on p̂.
![Page 18: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/18.jpg)
Predicting rating using existing models
Approach does not suffer from a cold-start problem
I Rate new movie from features of other movies user liked
Limitations
I sometimes, we do not have access to featuresI often does not perform as well as collaborative filtering methods
![Page 19: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/19.jpg)
Learning relationships
Recommender systems can uncover/model relationships betweenusers and items they are evaluating, using historical ratings.
Geared towards females
Geared towards males
serious
escapist
The PrincessDiaries
The Lion King
Braveheart
Lethal Weapon
Independence Day
AmadeusThe Color Purple
Dumb and Dumber
Ocean’s 11
Sense and Sensibility
Gus
Dave
Latent factor models
![Page 20: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/20.jpg)
Collaborative filtering
Data we may have (example from Netflix challenge)
scoredatemovieuser15/7/02211
58/2/042131
43/6/013452
45/1/051232
37/15/027682
51/22/01763
48/3/00454
19/10/055685
23/5/033425
212/28/002345
58/11/02766
46/15/03566
scoredatemovieuser?1/6/05621
?9/13/04961
?8/18/0572
?11/22/0532
?6/13/02473
?8/12/01153
?9/1/00414
?8/27/05284
?4/4/05935
?7/16/03745
?2/14/04696
?10/3/03836
Training data Test data
Movie rating data
![Page 21: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/21.jpg)
Collaborative filteringData commonly represented as a rating matrix.Neighborhood-based CF
121110987654321
455311
3124452
534321423
245424
5224345
423316
users
items
- unknown rating - rating between 1 to 5
![Page 22: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/22.jpg)
Collaborative filtering
I a user viewed/bought an item (1)I a user did not view/buy an item (0)
• A powerful source of information:Characterize users by which movies they rated, rather than how they rated
• A dense binary representation of the data:
45531
312445
53432142
24542
522434
42331
users
movies
010100100101
111001001100
011101011011
010010010110
110000111100
010010010101
users
movies
Which movies users rate?
,ui u iR r ,ui u i
B b
![Page 23: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/23.jpg)
Collaborative filtering
I 1 user viewed/bought an item and liked itI -1 user viewed/bought an item and did not like itI 0 user did not view/buy an item
![Page 24: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/24.jpg)
Basic idea Part I:Basic neighborhood methods
Joe
#2
#3
#1
#4
![Page 25: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/25.jpg)
Basic idea
![Page 26: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/26.jpg)
Basic idea
similarity
s13 = 0.2s16 = 0.3
Predict rating usingweighted average
0.2 · 2 + 0.3 · 30.2 + 0.3 = 2.6
![Page 27: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/27.jpg)
Basic idea
(user, user) similarity to recommend items
(item, item) similarity to recommend new items that were also likedby the same users
The oldest known collaborative filtering method.
See Amazon recommendation system at scale:http://www.cs.umd.edu/~samir/498/Amazon-Recommendations.pdf
![Page 28: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/28.jpg)
Similarities
How do we measure (user, user) similarity or (item, item) similarity?
I Euclidean distanceI Jaccard similarityI Cosine similarityI Pearson correlation
Notation:
rating(user,item) = r(u,i) = rui
Iu = set of items purchased by user uUi = set of users who purchased by item i
![Page 29: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/29.jpg)
Euclidean distance
Distance between item i1 and item i2 is
dist2(i1, i2) =∑
u(ru,i1 − ru,i2)2
If each rating is 0 or 1 (user bought item or did not), then thedistance becomes
dist2(i1, i2) =#{users that bought i1, but not i2}+ #{users that bought i2, but not i1}
![Page 30: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/30.jpg)
Euclidean distance
Example:
U1 = {1, 4, 8, 9, 11, 23, 25, 34}U2 = {1, 4, 6, 8, 9, 11, 23, 25, 34, 35, 38}U3 = {4}U4 = {5}
What is the distance between items 1 and 2?
What is the distance between items 3 and 4?
![Page 31: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/31.jpg)
Euclidean distance
What is the distance between items 1 and 2? –> 3
What is the distance between items 3 and 4? –> 2
Problem:
I Favors small sets, even if they have few elements in common.
![Page 32: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/32.jpg)
Jaccard similarity
Measures similarity between sets
Jaccard(Ui ,Uj) = |Ui ∩ Uj ||Ui ∪ Uj
= bought i and jbought i or j
Key idea: normalize by popularity
![Page 33: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/33.jpg)
Jaccard similarity
I Maximum of 1 if two items were purchased by the same set ofusers or if the two users purchased exactly the same set ofitems.
I Minimum of 0 if the two items were purchased by completelydisjoint sets of users or if the two users purchased completelydisjoint sets of items.
![Page 34: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/34.jpg)
Jaccard similarity in actionHow does amazon generate their recommendations?http://www.cs.umd.edu/~samir/498/Amazon-Recommendations.pdf
A user is looking at
Ui is the set of users who viewed this product.
Rank products according to |Ui ∩Uj ||Ui ∪Uj
![Page 35: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/35.jpg)
Cosine similarityJaccard similarity works only on 0/1 data
Cosine similarity works on arbitrary data.
I 1 user viewed/bought an item and liked itI -1 user viewed/bought an item and did not like itI 0 user did not view/buy an item
![Page 36: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/36.jpg)
Cosine similarity
similarity(A,B) = cos(θ) = A · B‖A‖ · ‖B‖
I cos(θ) = 1 (θ = 0) A and B point in the same directionI cos(θ) = −1 (θ = 180) A and B point in the opposite directionI cos(θ) = 0 (θ = 90) A and B are orthogonal
![Page 37: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/37.jpg)
Cosine similarityEach item is represented by a vector of users’ ratings
Uharry potter = (0, 1, 1) Upitch black = (1, 1, 0)
similarity = (0, 1, 1) · (1, 1, 0)√2 ·√2
= 12
![Page 38: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/38.jpg)
Pearson correlation
Very similar to cosine similarity
Cosine similarity would fail if naively applied to ratings
Example:
R1 = (1, 1, 1)R2 = (5, 5, 5) −→ similarity = 1
Pearson correlation will solve this by removing average from therating vector
![Page 39: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/39.jpg)
Pearson correlation
Pearson correlation computed over shared support
sij =∑
u∈Ui ∩Uj (rui − r̄i )(ruj − r̄j)√∑u∈Ui ∩Uj (rui − r̄i )2 ·
∑u∈Ui ∩Uj (ruj − r̄j)2
![Page 40: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/40.jpg)
Pearson correlation vs cosine similarity
Pearson correlation
sij =∑
u∈Ui ∩Uj (rui − r̄i )(ruj − r̄j)√∑u∈Ui ∩Uj (rui − r̄i )2 ·
∑u∈Ui ∩Uj (ruj − r̄j)2
Cosine similarity
sij =∑
u∈Ui ∩Uj rui · ruj√∑u∈Ui ∩Uj r2
ui ·∑
u∈Ui ∩Uj r2uj
![Page 41: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/41.jpg)
How to use similarity to recommend?
Given similarity measure between items sij
Find set sk(i , u) of k-nearest neighbors to movie i that were ratedby user u
Estimate rating using weighted average over the set of neighbors
r̂ui =∑
j∈sk(i ,u) sij ruj∑j∈sk(i ,u) sij
![Page 42: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/42.jpg)
Normalization and bias problem
Problems:
I Some items are significantly higher ratedI Some users rate substantially lowerI Ratings change over time
Bias correction is crucial for collaborative filtering approaches
I global bias µI offset per user buI offset per movie biI time effects (ignore for now)
Baseline rating for (user, movie) is b(u, i) = µ+ bu + bi
![Page 43: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/43.jpg)
Normalization and bias problem
Mean rating of all movies µ = 3.7
Troll hunter is 0.7 above mean (bi = 0.7)
User rates 0.2 below mean (bu = −0.2)
For this (user, movie) baseline rating is 4.2 stars
![Page 44: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/44.jpg)
Estimating biases
minb
∑(u,i):r(u,i) 6=?
(r(u, i)− µ− bu − bi )2 + λ(∑
ub2
u +∑
ib2
i )
This is a linear model. Why?
![Page 45: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/45.jpg)
How to recommend with biases?
Similar to the approch earlier
Given similarity measure between items si j
Find set sk(i , u) of k-nearest neighbors to movie i that were ratedby user u
Estimate rating using weighted average over the set of neighbors
r̂ui = bui +∑
j∈sk(i ,u) sij(ruj − buj)∑j∈sk(i ,u) sij
![Page 46: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/46.jpg)
Temporal effects
![Page 47: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/47.jpg)
Temporal effects
![Page 48: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/48.jpg)
Temporal effects
![Page 49: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/49.jpg)
Recommendations based on similarities
I intuitiveI there is no trainingI easy to explain to a userI widely used in practiceI surprisingly, collaborative filtering is extremely useful even
though we have not looked at any featuresI accurcy and scalability questionableI cold start problemI will not necessarily encourage diverse results
![Page 50: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/50.jpg)
Cold start problem
What happens with new users where we have no ratings yet?
I Recommend popular items.I Have some start-up questions (for example, “tell me 10 movies
you love”).
What do we do with new items?
I Content-based filtering techniques (that is, use features).I Pay a focus group to rate them.
![Page 51: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/51.jpg)
Modelling approach to recommendations
So far we’ve looked at approaches that try to define some definitionof user/user and item/item similarity.
Recommendation consists of
1. Finding an item i that a user likes (gives a high rating)2. Recommending items that are similar to it (that is, items j with
a similar rating profile to i)
Hinges on finding a good measure of similarity
![Page 52: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/52.jpg)
Modelling approach to recommendations
What we want to do next is to model the rating.
rui = f (user, item) + noise
Recommendation consists of identifying items with largest rating
recommendation(u) = arg maxi∈unseen items
f (u, i)
![Page 53: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/53.jpg)
Netflix yardstick
Netflix prize
I In 2006, Netflix created a dataset of 100,000,000 movie ratingsI Data looked like: (userID, itemID, time, rating)I Whoever first manages to reduce the (R)MSE by 10% versus
Netflix’s solution wins $1,000,000I Data were de-anonymized — lawsuit againt Netflix
Root mean squared error for predicting ratings
RMSE(f ) =√√√√ 1
N∑u,i
(f (u, i)− rui )2
Predicted rating r̂ui = f (u, i)
![Page 54: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/54.jpg)
Netflix yardstick
A lot of research on minimizing the mean squared error.
Not clear that improving this metric will lead to better userexperience.
When building a model we focus on minimizing root mean squarederror.
![Page 55: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/55.jpg)
Latent factor modelSuppose we had K features of movies and users
Describe movie i with features qi
I How much is it action, romance, drama, . . .
qi = (0.9, 0.2, 0.5, . . .)
Describe user u with features pu
I How much she likes action, romance, drama, . . .
pu = (0.01, 0, 0.9, . . .)
f (u, i) is the product of the two vectors
f (u, i) = 0.9 · 0.01 + 0.2 · 0 + 0.5 · 0.9 + . . .
![Page 56: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/56.jpg)
Discovering features via matrix factorization
![Page 57: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/57.jpg)
Discovering features via matrix factorization
Geared towards females
Geared towards males
serious
escapist
The PrincessDiaries
The Lion King
Braveheart
Lethal Weapon
Independence Day
AmadeusThe Color Purple
Dumb and Dumber
Ocean’s 11
Sense and Sensibility
Gus
Dave
Latent factor models
![Page 58: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/58.jpg)
Discovering features via matrix factorization
![Page 59: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/59.jpg)
Discovering features via matrix factorization
![Page 60: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/60.jpg)
Discovering features via matrix factorization
![Page 61: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/61.jpg)
![Page 62: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/62.jpg)
Finding parameters of the latent factor model
Model f (u, i) = pu · qi
We will find p and q by minimizing the following objective
minp,q
∑(u,i):rui 6=?
(rui − pu · qi )2 + λ(∑u,k
p2u,k +
∑i ,k
q2i ,k)
Stochastic gradient descent
![Page 63: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/63.jpg)
Visualizing the first two factors
![Page 64: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/64.jpg)
Visualizing the first two factors
First factor:
I left: lowbrow comedies and horror movies, aimed at a male oradolescent audience
I right: drama or comedy with serious undertones and strongfemale leads
Second factor:
I top: independent, critically acclaimed, quirky filmsI bottom: mainstream formulaic films
![Page 65: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/65.jpg)
Improvements
I adding bias termsI adding features and implicit feedbackI modelling temporal effects
![Page 66: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/66.jpg)
Adding biases
40
6090
12818050
100200
50
100200
50
100 200 500
100200 500
50100 200 500 1000 1500
0.875
0.88
0.885
0.89
0.895
0.9
0.905
0.91
10 100 1000 10000 100000
RMSE
Millions of Parameters
Factor models: Error vs. #parameters
NMF
BiasSVD
SVD++
SVD v.2
SVD v.3
SVD v.4
Add biases
f (u, i) = µ+ bu + bi + pu · qi
![Page 67: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/67.jpg)
Combining real and discovered features
Real features capture context
I Time of the day, what I just saw, user info, what I bought inthe past
Discovered features from matrix factorization capture groups ofusers who behave similarly
I Users who like action movies and comedies
Mitigates cold-start problem
I Ratings for a new user from real features onlyI As more information about user is discovered, matrix
factorization “features” become more relevant
![Page 68: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/68.jpg)
Implicit informationRatings are not given at random!
B. Marlin et al., “Collaborative Filtering and the Missing at Random Assumption” UAI 2007
Yahoo! survey answersYahoo! music ratingsNetflix ratings
Distribution of ratings
Our decision about whether to purchase a movie is a function ofhow we expect to rate it.
For items we have purchased, our decision to enter a rating or writea review is a function of our rating.http://www.cs.toronto.edu/~marlin/research/papers/cfmar-uai2007.pdf
![Page 69: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/69.jpg)
40
6090
12818050
100200
50
100200
50
100 200 500
100200 500
50100 200 500 1000 1500
0.875
0.88
0.885
0.89
0.895
0.9
0.905
0.91
10 100 1000 10000 100000
RMSE
Millions of Parameters
Factor models: Error vs. #parameters
NMF
BiasSVD
SVD++
SVD v.2
SVD v.3
SVD v.4
“who rated what”
![Page 70: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/70.jpg)
Modeling temporal change
Time-dependent bias
Time-dependent user preferences
Parameterize functions b and p
f (u, i , t) = µ+ bu(t) + bi (t) + qi · pu(t)
Good parametrization is the key.
http://www.cc.gatech.edu/~zha/CSE8801/CF/kdd-fp074-koren.pdf
![Page 71: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/71.jpg)
40
6090
12818050
100200
50
100200
50
100 200 500
100200 500
50100 200 500 1000 1500
0.875
0.88
0.885
0.89
0.895
0.9
0.905
0.91
10 100 1000 10000 100000
RMSE
Millions of Parameters
Factor models: Error vs. #parameters
NMF
BiasSVD
SVD++
SVD v.2
SVD v.3
SVD v.4temporal effects
![Page 72: RecommenderSystems€¦ · Sense and Sensibility Gus Dave Latent factor models. Collaborativefiltering Datawemayhave(examplefromNetflixchallenge) user movie date score 1 21 5/7/02](https://reader037.fdocuments.in/reader037/viewer/2022090606/605ae4e28a9ef7177651e26d/html5/thumbnails/72.jpg)
Moral of the story
Increasing the number of parameters does not help much, butincreasing the model complexity does.
$1,000,000 seems to be incredibly cheap to get the amount ofresearch that was devoted to the task.
The winning solution never made it into production at Netflix.
It is not clear that a solution which changes RMSE slightly willresult in hugely improved user experience.