What is the perceptron learning rule for labels , and how does one update move the prediction in the right direction?
Supervised learning, Perceptron
Level L1 Beginner. Length Short. Nature Th+Mat Both.
What's being asked
Whether you can state the mistake-driven perceptron update and explain intuitively why it nudges the boundary towards fixing a misclassified point.
Key idea
Predict , where is the weight vector, is the bias (offset) and returns or . On a mistake, set and with learning rate , nudging the score towards the true label.
Steps
- Write the prediction rule: for an input , compute the score and predict if it is positive or if it is negative.
- Check each training point : if , the predicted sign matches , so nothing changes.
- If , it is a mistake. Update and , where is the step size (learning rate, often ).
- Explain why it helps: if a point got a negative score, adding tilts closer to and raises , so the score rises; if a point was mistaken, subtracting and lowers the score. Stop after a full pass with no mistakes (possible only when a straight line or plane can separate the classes); running this rule on numbers comes next.
Common mistakes
- Updating on every point rather than only on mistakes.
- Saying one update always fixes the misclassified point. It only nudges the score in the right direction.
- Claiming the perceptron converges on any dataset. On non-separable data it never stops making mistakes.
How long your answer should be
4–5 sentences with the update equation.
Read this
- Cornell CS4780, Lecture 3: the perceptron: The whole note: the update rule, why it moves the weights the right way, and the convergence proof.
- NPTEL: Introduction to Machine Learning (IIT Madras, Prof. Balaraman Ravindran): Week 4, Separating Hyperplane Approaches - Perceptron Learning, which covers the perceptron update rule.
- MIT OCW: 6.867 Machine Learning (Fall 2006): Lecture 1, Introduction, linear classification, perceptron update rule, which walks through the update.
Previous in Supervised learning: What is a kernel density estimate (Parzen window estimate), and what does the bandwidth control? Why is the method called non-parametric?
Next in Supervised learning: Why should you standardise the features before fitting ridge or lasso regression, but not necessarily before ordinary least squares?