Perceptron Training Algorithm
Let X = X+ U X- be the set of training examples. and let SX = X1, X2, ..., Xk, ... be a training sequence on X.
Let wk be the weight vector at step k.
Choose w0 arbitrarily. For example. w0 = (0, 0, ..., 0).
Each each step k, k = 0, 1, 2, . . .
If Xk is correctly classified, take wk+1 = wk.
If Xk is in X- but misclassified, take wk+1 = wk - ck Xk.
If Xk is in X+ but misclassified, take wk+1 = wk + ck Xk.
The sequence ck should be chosen according to the data. Overly large constant values can lead to oscillation during training. Values that are too small will increase training time. However, ck = c0/k will work for any positive c0.