Figure 7.13 displays two groups of data points, given in Table 7.8. The convex hulls have also

Question:

Figure 7.13 displays two groups of data points, given in Table 7.8. The convex hulls have also been plotted. It is possible to separate the two classes of points via a straight line.

In fact, many such lines are possible. SVM gives the best separation, in the sense that the gap (margin) between the points is maximal.

image text in transcribed

image text in transcribed

(a) Identify from the figure the three support vectors.

(b) For a separating boundary (line) given by \(\beta_{0}+\boldsymbol{\beta}^{\top} \boldsymbol{x}=0\), show that the margin width is \(2 / \|\) \(\boldsymbol{\beta} \|\).

(c) Show that the parameters \(\beta_{0}\) and \(\boldsymbol{\beta}\) that solve the convex optimization problem (7.24) provide the maximal width between the margins.

(d) Solve (7.24) using a penalty approach; see Section B.4. In particular, minimize the penalty function 415 \[ S\left(\boldsymbol{\beta}, \beta_{0}\right)=\|\boldsymbol{\beta}\|^{2}-C \sum_{i=1}^{n} \min \left\{\left(\beta_{0}+\boldsymbol{\beta}^{\top} \boldsymbol{x}_{i}\right) y_{i}-1,0\right\} \]
for some positive penalty constant \(C\).

(e) Find the solution the dual optimization problem (7.21) by using sklearn's sCV method. Note that, as the two point sets are separable, the constraint \(\lambda \leqslant 1\) may be removed, and the value of \(\gamma\) can be set to 1 .

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Data Science And Machine Learning Mathematical And Statistical Methods

ISBN: 9781118710852

1st Edition

Authors: Dirk P. Kroese, Thomas Taimre, Radislav Vaisman, Zdravko Botev

Question Posted: