Exercise 4.4

Answers

Let’s compute Ein(w):

Ein(w) = 1 N n=1N (wTz n yn) 2 = 1 NZw y2 = 1 N(Zw y)T(Zw y) = 1 N(wTZT yT)(Zw y) = 1 NwTZTZw wTZTy yTZw + yTy

On the other hand, the equation (4.3) is

Ein(w) = (w wlin)TZTZ(w wlin) + yT(I H)y N = (wT wlinT)ZTZ(w wlin) + yTy yTHy N = wTZTZw wTZTZwlin wlinTZTZw + wlinTZTZwlin + yTy yTHy N = wTZTZw wTZTZ(ZTZ)1ZTy ((ZTZ)1ZTy)TZTZw N + ((ZTZ)1ZTy)TZTZ(ZTZ)1ZTy + yTy yTZ(ZTZ)1ZTy N = wTZTZw wTZTy yTZ(ZTZ)TZTZw N + yTZ(ZTZ)TZTZ(ZTZ)1ZTy + yTy yTZ(ZTZ)1ZTy N = wTZTZw wTZTy yTZ(ZTZ)1ZTZw N + yTZ(ZTZ)1ZTy + yTy yTZ(ZTZ)1ZTy N = wTZTZw wTZTy yTZw + yTy N

This agrees with the result derived above. So we proved equation (4.3).

(a)
The value of w that minimizes Ein is wlin, since it makes the first term 0, which is a quadratic term on w and is greater or equal to 0 all the time. The second term doesn’t depend on w.
(b)
The minimum in-sample error when w = wlin is simply the second term, i.e. min Ein(w) = yT(IH)y N .
User profile picture
2021-12-08 09:27
Comments