How Does SVD Work?: Singular Value Decomposition (SVD) On Wikipedia
How Does SVD Work?: Singular Value Decomposition (SVD) On Wikipedia
SVD is extraordinarily useful and has many applications such as data analysis, signal processing,
pattern recognition, image compression, weather prediction, and Latent Semantic Analysis or
LSA (also referred to as Latent Semantic Indexing or LSI).
For the first attempt, let's make the HoleDifficulty be the par score for the hole, and let's make the
player ability equal to 1. So on the first hole, which is par 4, we would expect a player of ability 1
to get a score of 4.
For our entire scorecard or matrix, all we have to do is multiply the PlayerAbility (assumed to be
1 for all players) by the HoleDifficulty (ranges from par 3 to par 5) and we can exactly predict all
the scores in our example.
In fact, this is the one dimensional (1-D) SVD factorization of the scorecard. We can represent
our scorecard or matrix as the product of two vectors, the HoleDifficulty vector and the
PlayerAbility vector. To predict any score, simply multiply the appropriate HoleDifficulty factor
by the appropriate PlayerAbility factor. Following normal vector multiplication rules, we can
generate the matrix of scores by multiplying the HoleDifficulty vector by the PlayerAbility
vector, according to the following equation.
Rather than guessing HoleDifficulty and PlayerAbility factors and subtracting predicted scores,
there exist powerful algorithms than can calculate SVD factorizations for you. Let's look at the
actual scores from the first 9 holes of the 2007 Players Championship as played by Phil, Tiger,
and Vijay.
Why don't the hole averages and par percentages exactly match the 1-D SVD factors? The answer
is that SVD further refines those numbers in a cycle. For example, we can start by assuming
HoleDifficulty is the hole average and then ask what PlayerAbility best matches the scores, given
those HoleDifficulty numbers? Once we have that answer we can go back and ask what
HoleDifficulty best matches the scores given those PlayerAbility numbers? We keep iterating this
way until we converge to a set of factors that best predict the score. SVD shortcuts this process
and immediately give us the factors that we would have converged to if we carried out the
process.
One very useful property of SVD is that it always finds the optimal set of factors that best predict
the scores, according to the standard matrix similarity measure (the Frobenius norm). That is, if
we use SVD to find the factors of a matrix, those are the best factors that can be found. This
optimality property means that we don't have to wonder if a different set of numbers might
predict scores better.
Now let's look at the difference between the actual scores and our 1-D approximation. A plus
difference means that the actual score is higher than the predicted score, a minus difference
means the actual score is lower than the prediction. For example, on the first hole Tiger got a 4
and the predicted score was 4.64 so we get 4 - 4.64 = -0.64. In other words, we must add -0.64 to
our prediction to get the actual score.
Once these differences have been found, we can do the same thing again and predict these
differences using the formula HoleDifficulty2 * PlayerAbility2. Since these factors are trying to
predict the differences, they are the 2-D factors and we have put a 2 after their names (ex.
HoleDifficulty2) to show they are the second set of factors.