1
Solutions To Problems of Chapter 18
18.1. Prove that the perceptron algorithm, in its pattern-by-pattern mode of
operation, converges in a finite number of iteration steps. Assume that
θ(0) =0.
Hint: Note that since classes are assumed to be linearly separable, there
exists a normalized hyperplane, θ∗, and a γ > 0, so that
γ≤ynθT
∗xn, n = 1,2, . . . , N,
where, ynis the respective label, being +1 for ω1and −1 for ω2. By the
term normalized hyperplane, we mean that,
θT
∗= [ ˆ
θ∗, θ0∗]T,with ||ˆ
θ∗|| = 1.
In this case, ynθT
∗xnis the distance of xnfrom the hyperplane θ∗([164]).
Solution: Let us assume that we are currently at iteration i. This means
that so far i−1 update corrections have been performed by the algo-
rithm. The ith update will be performed only if the current sample, x(i),
is misclassified, i.e., only if
y(i)xT
(i)θ(i−1) ≤0,
and the update will be
Also from (1), we have that
||θ(i)||2=||θ(i−1)||2+ 2µy(i)xT
(i)θ(i−1) + (4)
µ2y2
(i)||x(i)||2