332
CHAPTER 9. RECOMMENDATION SYSTEMS
("batter" AND "pitcher")
"homerun"
OR
"Yankees" OR
"Jeter" OR "Teixeira"
Doesn’t
Like
Doesn’t
Like
Likes
Figure 9.3: A decision tree
have to consider many diﬀerent predicates, which could involve complex com-
binations of features. Thus, this approach tends to be used only for relatively
small problem sizes.
9.2.8
Exercises for Section 9.2
Exercise 9.2.1: Three computers, A, B, and C, have the numerical features
listed below:
Feature
A
B
C
Processor Speed
3.06
2.68
2.92
Disk Size
500
320
640
Main-Memory Size
6
4
6
We may imagine these values as deﬁning a vector for each computer; for in-
stance, A’s vector is [3.06, 500, 6]. We can compute the cosine distance between
any two of the vectors, but if we do not scale the components, then the disk
size will dominate and make diﬀerences in the other components essentially in-
visible. Let us use 1 as the scale factor for processor speed, α for the disk size,
and β for the main memory size.
(a) In terms of α and β, compute the cosines of the angles between the vectors
for each pair of the three computers.
(b) What are the angles between the vectors if α = β = 1?
(c) What are the angles between the vectors if α = 0.01 and β = 0.5?
