9.3. COLLABORATIVE FILTERING
333
! (d) One fair way of selecting scale factors is to make each inversely propor-
tional to the average value in its component. What would be the values
of α and β, and what would be the angles between the vectors?
Exercise 9.2.2: An alternative way of scaling components of a vector is to
begin by normalizing the vectors. That is, compute the average for each com-
ponent and subtract it from that component’s value in each of the vectors.
(a) Normalize the vectors for the three computers described in Exercise 9.2.1.
!! (b) This question does not require diﬃcult calculation, but it requires some
serious thought about what angles between vectors mean. When all com-
ponents are nonnegative, as they are in the data of Exercise 9.2.1, no
vectors can have an angle greater than 90 degrees. However, when we
normalize vectors, we can (and must) get some negative components, so
the angles can now be anything, that is, 0 to 180 degrees.
Moreover,
averages are now 0 in every component, so the suggestion in part (d) of
Exercise 9.2.1 that we should scale in inverse proportion to the average
makes no sense. Suggest a way of ﬁnding an appropriate scale for each
component of normalized vectors. How would you interpret a large or
small angle between normalized vectors? What would the angles be for
the normalized vectors derived from the data in Exercise 9.2.1?
Exercise 9.2.3: A certain user has rated the three computers of Exercise 9.2.1
as follows: A: 4 stars, B: 2 stars, C: 5 stars.
(a) Normalize the ratings for this user.
(b) Compute a user proﬁle for the user, with components for processor speed,
disk size, and main memory size, based on the data of Exercise 9.2.1.
9.3
Collaborative Filtering
We shall now take up a signiﬁcantly diﬀerent approach to recommendation.
Instead of using features of items to determine their similarity, we focus on the
similarity of the user ratings for two items. That is, in place of the item-proﬁle
vector for an item, we use its column in the utility matrix. Further, instead
of contriving a proﬁle vector for users, we represent them by their rows in the
utility matrix. Users are similar if their vectors are close according to some
distance measure such as Jaccard or cosine distance. Recommendation for a
user U is then made by looking at the users that are most similar to U in this
sense, and recommending items that these users like. The process of identifying
similar users and recommending what similar users like is called collaborative
ﬁltering.
