9.4. DIMENSIONALITY REDUCTION
341
V shown with their entries as variables to be determined.
This example is
essentially the smallest nontrivial case where there are more known entries than
there are entries in U and V combined, and we therefore can expect that the
best decomposition will not yield a product that agrees exactly in the nonblank
entries of M.
✷
9.4.2
Root-Mean-Square Error
While we can pick among several measures of how close the product UV is to
M, the typical choice is the root-mean-square error (RMSE), where we
1. Sum, over all nonblank entries in M the square of the diﬀerence between
that entry and the corresponding entry in the product UV .
2. Take the mean (average) of these squares by dividing by the number of
terms in the sum (i.e., the number of nonblank entries in M).
3. Take the square root of the mean.
Minimizing the sum of the squares is the same as minimizing the square root
of the average square, so we generally omit the last two steps in our running
example.


1
1
1
1
1
1
1
1
1
1


×
 1
1
1
1
1
1
1
1
1
1

=


2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2


Figure 9.10: Matrices U and V with all entries 1
Example 9.12 : Suppose we guess that U and V should each have entries that
are all 1’s, as shown in Fig. 9.10.
This is a poor guess, since the product,
consisting of all 2’s, has entries that are much below the average of the entries
in M.
Nonetheless, we can compute the RMSE for this U and V ; in fact
the regularity in the entries makes the calculation especially easy to follow.
Consider the ﬁrst rows of M and UV . We subtract 2 (each entry in UV ) from
the entries in the ﬁrst row of M, to get 3, 0, 2, 2, 1. We square and sum these
to get 18. In the second row, we do the same to get 1, −1, 0, 2, −1, square and
sum to get 7. In the third row, the second column is blank, so that entry is
ignored when computing the RMSE. The diﬀerences are 0, 1, −1, 2 and the sum
of squares is 6. For the fourth row, the diﬀerences are 0, 3, 2, 1, 3 and the sum
of squares is 23. The ﬁfth row has a blank entry in the last column, so the
diﬀerences are 2, 2, 3, 2 and the sum of squares is 21. When we sum the sums
from each of the ﬁve rows, we get 18 + 7 + 6 + 23 + 21 = 75. Generally, we shall
