How a Perceptron Learns
Correct mistakes by nudging weights
The classic perceptron learning rule visits labeled examples, predicts a class, and adjusts weights only when the prediction is wrong. Inputs responsible for a missed positive get weights nudged upward; inputs behind a false positive get nudged downward. The learning rate controls adjustment size.
prediction = step(dot(weights, x) + bias)
error = true_label - prediction
weights = weights + learning_rate × error × x
bias = bias + learning_rate × error
This algorithm converges if a straight boundary can perfectly separate the classes. If they overlap or require a curved boundary, updates can continue without a perfect solution. Modern loss functions handle imperfect separation more gracefully by measuring degrees of error.
Scenario: A missed incident hasx=[2,3], error+1, and learning rate0.1. The weights increase by[0.2,0.3], making similar high-input cases more likely to activate next time.
Tip: The learning rule is useful intuition, not the exact training algorithm for today's deep networks. Gradient descent generalizes the nudge to differentiable losses and many layers.