Starting from:
$30

$24

Week 9 Solution




Question 1 Corrected (For Assessment)




Show that, for the maximum margin classifier, the correct value of β0 is






β0=−
maxi:yi=−1(β∗)T xi + mini:yi=1
(β∗)T xi
,
where β∗ = P






2


n
λi∗yixi is the optimal value for
β.




i=1




Question 2




Work through labs 9.6.2 and 9.6.5 in the text book. This should give you a feeling for how support vector classifiers work in R.




Question 3




Consider the support vector classifier with the Lagrangian




1
n
n






n
X
X






X
L(β, β0, ξ, λ, µ) =


βTβ+C


ξi − λi yi(xiT β + β0) − 1 + ξi − µiξi
2








i=1
i=1






i=1
Using the KKT equations, show that the optimal β can be written as
















n
















β =
X
















λiyixi.






















i=1








Show that λ solves






















n


1
n n












X








X X












max
λ






y y
λ
λ
xT x






i − 2






λ


i j
i
j
i
j




i=1








i=1 j=1








Subject to:




0 ≤ λi ≤ C, i = 1, . . . , n




n

X

λiyi = 0.




i=1




Argue that




λi = 0 ⇒ yi(βT xi + β0) ≥ 1




λi = C ⇒ yi(βT xi + β0) ≤ 1




0 < λi < C ⇒ yi(βT xi + β0) = 1.




1

More products