Contents
I. Perceptron Model
The perceptron is a linear binary classification model. Its input is an instance’s feature vector, and its output is the instance’s class. Its goal is to find a separating hyperplane that linearly divides the training data.
Suppose the input space is and the output space is . The input represents an instance’s feature vector, corresponding to a point in the input space. The output represents the instance’s class. The function from the input space to the output space is:
This function is called a perceptron. Here, is the weight vector, is the bias, and sign is the sign function sign(x)= {+1(if x>=0), -1(if x<0)}.
II. Perceptron Learning Strategy
2.1 Linear Separability of a Dataset
Given a dataset, if a hyperplane exists that can correctly place all positive and negative instances on opposite sides of the hyperplane, the dataset is called a linearly separable dataset. Otherwise, it is called linearly inseparable.
2.2 Learning Strategy
The distance from any point in the input space to hyperplane S is:
Therefore, the distance from a misclassified point to hyperplane S is:
The total distance of all misclassified points, namely the loss function, is:
Clearly, the loss function is nonnegative. The perceptron learning strategy is to find the model parameters in the hypothesis space that minimize the loss function.
2.3 Learning Algorithm
The perceptron learning algorithm uses stochastic gradient descent. Each time, it randomly selects a misclassified point and performs a gradient-descent update.
Input: linearly separable dataset T and learning rate
Output: perceptron model
(1) Choose initial values (2) Select data from the training set (3) If , update the parameters as and , where is the learning rate and the latter terms are the gradients of the two parameters (4) Repeat the preceding process until there are no misclassified points in the training set
When the training dataset is linearly separable, the perceptron learning algorithm converges. That is, after a finite number of iterations, it can find a separating hyperplane that correctly separates all training data.
III. Exercise
3.1 Why the Perceptron Cannot Represent XOR
Plotting the distribution of the training set makes it easy to see that a single linear plane cannot separate the + and - regions.

Comments