The perceptron, one point at a time
θ starts at 0. We sweep through the points; whenever a point is on the wrong side (margin ≤ 0) we nudge θ toward it: θ ← θ + y·x. The boundary is the line where θ·x (+ θ₀) = 0 — perpendicular to θ. Step through and watch how it lurches around early on, then settles once the data is separated.
if y⁽ⁱ⁾(θ·x⁽ⁱ⁾ + θ₀) ≤ 0 then θ ← θ + y⁽ⁱ⁾x⁽ⁱ⁾ (θ₀ ← θ₀ + y⁽ⁱ⁾)
+1 class
−1 class
decision boundary
θ vector (normal)
target θ* (dashed)
Controls
Speed
—
Model
Target θ* — show where a working classifier lands
Click the plot to edit points
Data set
Saved examples — these take several epochs to settle
This step
Iterations
| T | i | x | y | θ·x+θ₀ | upd? | θ after |
|---|