Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2
j1
= 1. This constraint is necessary since
otherwise setting these elements to be arbitrarily large in absolute value could result in an arbitrarily large
variance.
If we take vector
1
with elements
11
,
21
, ..,
p1
, it denes a direction in feature space along which the data
vary the most.
The second principal component is the linear combination of X
1
, X
2
, ...X
p
that has maximal variance among
all linear combinations that are uncorrelated with Z
1
, and so on. For data set with p variables there are p
principal components,
1
,
2
, ...,
p
. You can nd
i,j
(x
i,j
u
i
.v
j
)
2
dot product u
i
.v
j
is a predicted preference of user i for item j. You want it to be as close as possible to actual
preference.
So we found the best choice for U and V is the one that minimizes squared dierences between prediction
and observation.
Matrix U will have a row for each user and a column for each latent feature. V will have row for each item
and a column for each latent feature.
Method
1) Center Data Subtract variable mean from each data point. This way you get a mean variable value of
0. Call this matrix U.
2) Calculate Covariance Matrix
3) Calculate Eigenvectors and Eigenvalues of the Covariance Matrix If you can multiply square
matrix with a vector and get multiple of the same vector, you have an eigenvector.
A =
A is a square matrix
is eigenvectos
is eigenvalue
Example:
2 3
2 1
3
2
12
8
= 4
3
2