Topics
The perception classification rule is defined as:
We can see that when and when . Thus, misclassification for sample in our dataset happens when the signs of our prediction and our targets are opposite.
To “fix” this, our learning rule should move the weights vector in the correct direction, which is less than 90 degrees with the positive example data vectors and more than 90 degrees with the negative example data vectors .
Formally, the algorithm can be spelled out as:
- Pick any misclassified datapoint from: , say
- Update weights as:
- Repeat until
max_iters
or no misclassification
This will work great and converge if the data is linearly separable.