Database Reference
In-Depth Information
C it is 1; i.e., C appears further from A than B does, which is intuitively correct. Applying
cosine distance to Fig. 9.5 allows us to draw the same conclusion.
Figure 9.5 Utilities of 3, 4, and 5 have been replaced by 1, while ratings of 1 and 2 are omitted
Normalizing Ratings
If we normalize ratings, by subtracting from each rating the average rating of that user, we
turn low ratings into negative numbers and high ratings into positive numbers. If we then
take the cosine distance, we find that users with opposite views of the movies they viewed
in common will have vectors in almost opposite directions, and can be considered as far
apart as possible. However, users with similar opinions about the movies rated in common
will have a relatively small angle between them.
EXAMPLE 9.9 Figure 9.6 shows the matrix of Fig. 9.4 with all ratings normalized. An inter-
esting effect is that D 's ratings have effectively disappeared, because a 0 is the same as a
blank when cosine distance is computed. Note that D gave only 3s and did not differentiate
among movies, so it is quite possible that D 's opinions are not worth taking seriously.
Figure 9.6 The utility matrix introduced in Fig. 9.1
Let us compute the cosine of the angle between A and B :
The cosine of the angle between between A and C is
Notice that under this measure, A and C are much further apart than A and B , and neither
pair is very close. Both these observations make intuitive sense, given that A and C dis-
agree on the two movies they rated in common, while A and B give similar scores to the
one movie they rated in common.
Search WWH ::




Custom Search