You are on page 1of 1

1.

a. It’s a fully trained perceptron so error for the training set should be 0. So we don’t need
to even calculate anything with the training set.
b. Since it’s fully trained the error on the training set should be 0. You could just look at the
error of the points in the test set. If the error is greater than 0, then test error is higher
than train error.

2.
w_0 = (0,0)
w_1 = (0,0) + (1)(10, -2) = (10, -2)
w_2 = (10,-2) + (-1)(12, 2) = (-2, -4)
w_3 = (-2, -4) + (1)(10, -2) = (8, -6)
w_4 = (8, -6) + (-1)(12, 2) = (-4, -8)
w_5 = (-4, -8) + (1)(10, -2) = (6, -10)
w_6 = (6, -10) + (-1)(12, 2) = (-6, -12)
w_7 = (-6, -12) + (1)(10, -2) = (4, -14)
w_8 = (4, -14) + (-1)(12, 2) = (-8, -16)
w_9 = (-8, -16) + (1)(10, -2) = (2, -18)

Therefore, the separating hyperplane can be expressed as one whose perpendicular vector is
(2,-18). This required 9 updates total.

3.
a. The minimum distance to the plane is sqrt(2)/2. However, as the points are not
normalized, this is not the value for gamma.
b. After normalizing the data set, the minimum distance is 1/2, which is gamma. By the
theorem in class, the upper bound on the iterations of the algorithm is 1/gamma^2, which
is 1/(1/4) = 4.
c. By adding a positive point to the negative side of the graph, the data is not linearly
separable. Therefore, the upper bound on the iterations is infinite.

4. The resulting hyperplane can be expressed as 2*vector_1 + 1*vector_2 - (vector_3 +


vector_4 + vector_5) = (-3, -10, 3, -3, 3).

You might also like