Chapter 5

# Perceptron Learning Simulator

Draw data points, then train the perceptron step-by-step or watch it converge automatically

The perceptron learning algorithm updates weights when it makes a mistake: w ← w + η(y − ŷ)x. For a false negative (missed positive point), the boundary rotates toward the point. For a false positive, it rotates away. If the data is linearly separable, this process is guaranteed to converge. Try XOR to see what happens when it isn't!

#### Errors per Epoch

### Controls

Draw Points

Click the canvas to place points, or pick a preset:

Presets
Learning Rate (η)
Value 1.0
Training
Speed 5
Current Weights
w₁
0.00
w₂
0.00
b
0.00
Epoch
0
Errors
0
Ready — draw points or pick a preset
Update Rule Cases

Case | y | ŷ | Update
--- | --- | --- | ---
Correct (pos) | 1 | 1 | None
Correct (neg) | 0 | 0 | None
False negative | 1 | 0 | w + ηx
False positive | 0 | 1 | w − ηx