An example of a kernelized learning algorithm
To illustrate the simplicity of kernelized algorithms we’ll demonstrate with a code example for a specific inner-product based learning algorithm. The algorithm we’ll use is Fisher Discriminant Analysis (FDA), which is an algorithm for assigning points to class labels. The standard version of FDA is a form of Linear Discriminant Analysis (LDA). When we run the kernelized version of the FDA, we will be doing Kernel Fisher Discriminant Analysis (kFDA).
kFDA code example
We will start with the example data in Figure 12.1. The classes are linearly separable, so we’ll use a linear Fisher discriminant to construct a classifier. A linear discriminant for a two-class problem uses the orthogonal distance of a point from a line to determine which class the point is in. If the point is one side of the line, we say it is in class 1
, while if it is on the other side of the line, we say it is in class 2
. The line is our...