In machine learning, the kernel perceptron is a variant of the popular perceptron learning algorithm that can learn kernel machines, i.e. non-linear classifiers that employ a kernel function to compute the similarity of unseen samples to training samples. The algorithm was invented in 1964, making it the first kernel classification learner.
Preliminaries
The perceptron algorithm
The perceptron algorithm is an online learning algorithm that operates by a principle called "error-driven learning". It iteratively improves a model by running it on training samples, then updating the model whenever it finds it has made an incorrect classification with respect to a supervised signal. The model learned by the standard perceptron algorithm is a linear binary classifier: a vector of weights w (and optionally an intercept term b, omitted here for simplicity) that is used to classify a sample vector x as class "one" or class "minus one" according to
y ^ = sgn ( w ⊤ x ) {\displaystyle {\hat {y}}=\operatorname {sgn}(\mathbf {w} ^{\top }\mathbf {x} )}
where a zero is arbitrarily mapped to one or minus one. (The "hat" on ŷ denotes an estimated value.) In pseudocode, the perceptron algorithm is given by:
Initialize w to an all-zero vector of length p, the number of predictors (features). For some fixed number of iterations, or until some stopping criterion is met: For each training example xi with ground truth label yi ∈ {-1, 1}: Let ŷ = sgn(wT xi). If ŷ ≠ yi, update w ← w + yi xi.
Kernel Methods
By contrast with the linear models learned by the perceptron, a kernel method is a classifier that stores a subset of its training examples xi, associates with each a weight αi, and makes decisions for new samples x' by evaluating
sgn ∑ i α i y i K ( x i , x ′ ) {\displaystyle \operatorname {sgn} \sum _{i}\alpha _{i}y_{i}K(\mathbf {x} _{i},\mathbf {x'} )} . Here, K is some kernel function. Formally, a kernel function is a non-negative semidefinite kernel (see Mercer's condition), representing an inner product between samples in a high-dimensional space, as if the samples had been expanded to include additional features by a function Φ: K(x, x') = Φ(x) · Φ(x'). Intuitively, it can be thought of as a similarity function between samples, so the kernel machine establishes the class of a new sample by weighted comparison to the training set. Each function x' ↦ K(xi, x') serves as a basis function in the classification.
Algorithm To derive a kernelized version of the perceptron algorithm, we must first formulate it in dual form, starting from the observation that the weight vector w can be expressed as a linear combination of the n training samples. The equation for the weight vector is
w = ∑ i n α i y i x i {\displaystyle \mathbf {w} =\sum _{i}^{n}\alpha _{i}y_{i}\mathbf {x} _{i}}
where αi is the number of times xi was misclassified, forcing an update w ← w + yi xi. Using this result, we can formulate the dual perceptron algorithm, which loops through the samples as before, making predictions, but instead of storing and updating a weight vector w, it updates a "mistake counter" vector α. We must also rewrite the prediction formula to get rid of w:
… excerpt ends here. Continue reading the full article.
