
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















Docsity.com
The goal of collaborative filtering (CF) is to infer userpreferences for items given a large but incompletecollection of preferences for many users.
For example:^ –
Suppose you infer from the data that most of the userswho like “Star Wars” also like “Lord of the Rings” anddislike “Dune”.
-
Then if a user watched and liked “Star Wars” you wouldrecommend him/her “Lord of the Rings” but not“Dune”.
Peferences can be explicit or implicit:^ –
Explicit preferences: ratings given to items by users.
-
Implicit preferences: which items were rented or boughtby users.
2
Docsity.com
Two years ago, Netflix has announced a movie ratingpredictions competition.
Whoever improves Netflix’s own baseline score by 10%will win the 1 million dollar prize.
The training data set consists of 100,480,507 ratings from480,189 randomly-chosen, anonymous users on 17,770movie titles. The data is very sparse, most users rate onlyfew movies.
Also, Netflix provides a test set containing 2,817,131user/movie pairs with the ratings withheld. The goal is topredict those ratings as accurately as possible.
4
Docsity.com
We will provide you with a subset of the Netflix trainingdata: a few thousand users + a few thousand movies, sothat you can easily run your algorithms on CDF machines.
We will also provide you with a validation set. You willreport the achieved prediction accuracy on this validationset.
There will be two projects based on the following twomodels:^ –
Probabilistic Matrix Factorization (PMF)
-
Restricted Boltzmann Machines (RBM’s)
You can choose which model you would like to work on.
This tutorial will cover only PMF (the easy 4-5% onNetflix).
5
Docsity.com
U
V
Features
Features
R
User
Movie
N Users
M Movies
T
Suppose we have
movies,
users, and integer rating
values from 1 to
.
Let
ij
be the rating of user
i
for movie
j
, and
D
×
N
,
D
×
M
be latent user and movie feature matrices.
We will use
i
and
j
to denote the latent feature vectors
for user
i
and movie
j
respectively.
7
Docsity.com
To predict the rating given by user
i
to movie
j
, we simply
compute the dot product between the correspondingfeature vectors:^ –
ij
T i
j
k
ik
jk
Intuition: for each user, we predict a movie rating bygiving the movie feature vector to a linear model.^ –
The movie feature vector can be viewed as the input.
-
The user feature vector can be viewed as the weightvector.
-
The predicted rating is the output.
-
Unlike in linear regression, where inputs are fixed andweights are learned, we learn
both
the weights
and
the
inputs (by minimizing squared error).
-
Note that the model is symmetric in movies and users.
8
Docsity.com
U
V
j
i
R
ij
j=1,...,M
i=1,...,N
V σ
U σ
σ
MAP Learning: Maximize the log-
posterior over movie and userfeatures with fixed hyperparameters. •
Equivalent to minimizing the
sum-of-squared-errors withquadratic regularization terms: E
N ∑^ i
=
M ∑^ j
=
ij
ij
T i
j
2
λ
U 2
N ∑^ i
=
i
2 F ro
λ
V 2
M ∑^ j
=
j
2 F ro
λ
U
σ
2
/σ
(^2) U
,
λ
V
σ
2
/σ
(^2) V
, and
ij
if user
i
rated movie
j
and is 0 otherwise.
10
Docsity.com
N ∑^ i
=
M ∑^ j
=
ij
ij
T i
j
2
λ
U 2
N ∑^ i
=
i
2 F ro
λ
V 2
M ∑^ j
=
j
2 F ro
Find a local minimum by performing gradient descent in U
and
.
If all ratings were observed, the objective reduces to theSVD objective in the limit of prior variances going toinfinity.
PMF can be viewed as a probabilistic extension of SVD,which works well even when most entries in
are
missing.
11
Docsity.com
U
V
j
i
R
ij
j=1,...,M
i=1,...,N
σ
Θ
V
U α Θ
α
V
U
Can use more sophisticated
regularization methods thansimple penalization of the Frobeniusnorm of the feature matrices:
priors with diagonal or fullcovariance matrices andadjustable means, or even mixture ofGaussians priors.
Using spherical Gaussian priors for feature
vectors leads to the standard PMF with λ
U
and
λ
V
chosen automatically.
Automatic selection of the hyperparameter values worked
considerably better than the manual approach that used avalidation set.
13
Docsity.com
Two users that have rated similar movies are likely to havepreferences more similar than two randomly chosed users.
Make the prior for the user feature vector depend on themovies the user has rated.
This will force users who have seen the same (or similar)movies to have similar prior distributions for their featurevectors.
14
Docsity.com
i Y
V
j
R
ij
j=1,...,M
U
i
i I
i=1,...,N
V σ
U σ
W k=1,...,M
W k σ
σ
The feature vector for user
i
:
i
i
Mk
=
ik
k
Mk
=
ik
For standard PMF,
i
and
i
are equal because the priormean is fixed at zero. •
The model:
p
Y, V, W, σ
2
N ∏ i
=
M ∏ j
=
ij
i
Mk
=
ik
k
Mk
=
ik
T
j
, σ
2
I
ij
with
p
σ
W
M ∏ k
=
k
, σ
(^2) W
16
Docsity.com
The Netflix dataset is large, sparse, and imbalanced.
The training set: 100,480,507 ratings from 480,189 users on17,770 movies.
The validation set: 1,408,395 ratings. The test set: 2,817,131user/movie pairs with ratings withheld.
The dataset is very imbalanced. The number of ratingsentered by each user ranges from 1 to over 15000.
Performance is assessed by submitting predictions toNetflix, which prevents accidental cheating since the testanswers are known only to Netflix.
17
Docsity.com
1−
6−
−
−
−
−
−
−
>
0. 0.
0. 0.
1
1.
1. 1.
1.
Number of Observed Ratings
RMSE
PMF
ConstrainedPMF
Movie Average
1−
6−
−
−
−
−
−
−
>
5 0 20 15 10
Number of Observed Ratings
Users (%)
Left Panel: Performance of constrained PMF, PMF andmovie average algorithm that always predicts the averagerating of each movie.
Right panel: Distribution of the number of ratings per userin the training dataset.
19
Docsity.com
0
5
10
15
20
25
30
35
40
45
50
55
60
0. 0.908 0.906 0.904 0.
0. 0.918 0.916 0.914 0.
0.
Epochs
RMSE
Constrained PMF(using Test rated/unrated id)
ConstrainedPMF
Performance of constrained PMF that uses an additionalrated/unrated information from the test dataset.
Netflix tells us in advance which user/movie pairs occurin the test set.
20
Docsity.com