9.3. COLLABORATIVE FILTERING
339
(b) If the entry in the cluster-cluster utility matrix for C and D is something
other than blank, use this value as the estimated value for the U–I entry
in the original utility matrix.
(c) If the entry for C–D is blank, then use the method outlined in Section 9.3.2
to estimate that entry by considering clusters similar to C or D. Use the
resulting estimate as the estimate for the U-I entry.
9.3.4
Exercises for Section 9.3
a
b
c
d
e
f
g
h
A
4
5
5
1
3
2
B
3
4
3
1
2
1
C
2
1
3
4
5
3
Figure 9.8: A utility matrix for exercises
Exercise 9.3.1: Figure 9.8 is a utility matrix, representing the ratings, on a
1–5 star scale, of eight items, a through h, by three users A, B, and C. Compute
the following from the data of this matrix.
(a) Treating the utility matrix as boolean, compute the Jaccard distance be-
tween each pair of users.
(b) Repeat Part (a), but use the cosine distance.
(c) Treat ratings of 3, 4, and 5 as 1 and 1, 2, and blank as 0. Compute the
Jaccard distance between each pair of users.
(d) Repeat Part (c), but use the cosine distance.
(e) Normalize the matrix by subtracting from each nonblank entry the average
value for its user.
(f) Using the normalized matrix from Part (e), compute the cosine distance
between each pair of users.
Exercise 9.3.2: In this exercise, we cluster items in the matrix of Fig. 9.8.
Do the following steps.
(a) Cluster the eight items hierarchically into four clusters. The following
method should be used to cluster. Replace all 3’s, 4’s, and 5’s by 1 and
replace 1’s, 2’s, and blanks by 0. use the Jaccard distance to measure
the distance between the resulting column vectors. For clusters of more
than one element, take the distance between clusters to be the minimum
distance between pairs of elements, one from each cluster.
