480
CHAPTER 12. LARGE-SCALE MACHINE LEARNING
A new page could be classiﬁed as belonging to the topic that gives the
highest score when the dot product of the page’s vector and the weight vectors
for the topics are computed. An alternative interpretation of the situation is
to classify a page as belonging to all those topics for which the dot product is
above some threshold.
12.2.6
Transforming the Training Set
While a perceptron must use a linear function to separate two classes, it is
possible to transform the vectors of a training set before applying a perceptron-
based algorithm to separate the classes. It is, in principle, always possible to
ﬁnd such a transformation, as long as we are willing to transform to a higher-
dimensional space. But if we understand enough about our data, we can often
ﬁnd a simple transformation that works. An example should give the basic
idea.
Figure 12.10: Transforming from rectangular to polar coordinates turns this
training set into one with a separating hyperplane
Example 12.7 : In Fig. 12.10 we see a plot of places to visit from my home.
The horizontal and vertical coordinates represent latitude and longitude of
places. Some of the places have been classiﬁed into “day trips” – places close
enough to visit in one day – and “excursions,” which require more than a day
to visit. These are the circles and squares, respectively. Evidently, there is no
