diff --git a/doc/pub/week47/html/._week47-bs000.html b/doc/pub/week47/html/._week47-bs000.html index 1ea0bfbb9..fd20117c5 100644 --- a/doc/pub/week47/html/._week47-bs000.html +++ b/doc/pub/week47/html/._week47-bs000.html @@ -157,7 +157,7 @@ MathJax.Hub.Config({
[2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

-

Nov 22, 2020

+

Nov 26, 2020


diff --git a/doc/pub/week47/html/._week47-bs009.html b/doc/pub/week47/html/._week47-bs009.html index 3b145db69..45f5293a8 100644 --- a/doc/pub/week47/html/._week47-bs009.html +++ b/doc/pub/week47/html/._week47-bs009.html @@ -148,7 +148,7 @@ that could be chosen. Our objective is to find a plane that has the maximum margin, i.e the maximum distance between data points of both classes. Maximizing the margin distance provides some reinforcement so that future data points can be classified with -more confidence. +more confidence. Figure 12.1 of Hastie et al is a good illustration.

What a linear classifier attempts to accomplish is to split the diff --git a/doc/pub/week47/html/._week47-bs010.html b/doc/pub/week47/html/._week47-bs010.html index c07b84731..4c6dd3b40 100644 --- a/doc/pub/week47/html/._week47-bs010.html +++ b/doc/pub/week47/html/._week47-bs010.html @@ -143,13 +143,13 @@ MathJax.Hub.Config({

Let us define the function $$ -f(x) = \boldsymbol{w}^T\boldsymbol{x}+b = 0, +f(x) = \boldsymbol{x}^T\boldsymbol{w}+b = 0, $$ -as the function that determines the line \( L \) that separates two classes (our two features), see the figure here. +as the function that determines the line \( L \) that separates two classes (our two features), see Figure 12.1 of Hastie et al.

-Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{w}^T(\boldsymbol{x}_1-\boldsymbol{x}_2)=0 \). +Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{x}^T(\boldsymbol{w}_1-\boldsymbol{x}_2)=0 \).

The signed distance \( \delta \) from any point defined by a vector \( \boldsymbol{x} \) and a point \( \boldsymbol{x}_0 \) on the line \( L \) is then diff --git a/doc/pub/week47/html/._week47-bs011.html b/doc/pub/week47/html/._week47-bs011.html index a4e45d1da..b164b9bc4 100644 --- a/doc/pub/week47/html/._week47-bs011.html +++ b/doc/pub/week47/html/._week47-bs011.html @@ -146,7 +146,7 @@ do is to define a cost function which now contains the set of all misclassified points \( M \) and attempt to minimize this function $$ -C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b). +C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b). $$

diff --git a/doc/pub/week47/html/._week47-bs014.html b/doc/pub/week47/html/._week47-bs014.html index ef8537a2c..74c6989a3 100644 --- a/doc/pub/week47/html/._week47-bs014.html +++ b/doc/pub/week47/html/._week47-bs014.html @@ -149,7 +149,7 @@ Thus, we wish to find a margin \( M \) with \( \boldsymbol{w} \) normalized to \( \vert\vert \boldsymbol{w}\vert\vert =1 \) subject to the condition $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. $$ All points are thus at a signed distance from the decision boundary defined by the line \( L \). The parameters \( b \) and \( w_1 \) and \( w_2 \) define this line. @@ -157,12 +157,12 @@ All points are thus at a signed distance from the decision boundary defined by t

We seek thus the largest value \( M \) defined by $$ -\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, +\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, $$ or just $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. $$ If we scale the equation so that \( \vert \vert \boldsymbol{w}\vert\vert = 1/M \), we have to find the minimum of @@ -172,10 +172,10 @@ y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq 1 \hspace{0.1cm}\forall i. $$

-We have thus defined our margin as the invers of the norm of +We have thus defined our margin as the inverse of the norm of \( \boldsymbol{w} \). We want to minimize the norm in order to have a as large as possible margin \( M \). Before we proceed, we need to remind ourselves -about Lagrangian multipliers. +about Lagrangian multipliers and optimzation problems.

diff --git a/doc/pub/week47/html/._week47-bs017.html b/doc/pub/week47/html/._week47-bs017.html index e728d9ff1..363424446 100644 --- a/doc/pub/week47/html/._week47-bs017.html +++ b/doc/pub/week47/html/._week47-bs017.html @@ -165,17 +165,20 @@ $$ subject to the constraints \( \lambda_i\geq 0 \) and \( \sum_i\lambda_iy_i=0 \). We must in addition satisfy the Karush-Kuhn-Tucker (KKT) condition $$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -1\right] \hspace{0.1cm}\forall i. +\lambda_i\left[y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) -1\right] \hspace{0.1cm}\forall i. $$

    -
  1. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  2. -
  3. If \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).
  4. +
  5. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  6. +
  7. If \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).
When \( \lambda_i > 0 \), the vectors \( \boldsymbol{x}_i \) are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin \( M \). +

+The support vectors (the points that define the margin \( M \)) are the quantities we keep in order to make predictions. +

diff --git a/doc/pub/week47/html/._week47-bs019.html b/doc/pub/week47/html/._week47-bs019.html index a8facbd9e..9fec2b059 100644 --- a/doc/pub/week47/html/._week47-bs019.html +++ b/doc/pub/week47/html/._week47-bs019.html @@ -149,12 +149,12 @@ $$ With our vector \( \boldsymbol{w} \) we can in turn find the value of the intercept \( b \) (here in two dimensions) via $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1, $$ resulting in $$ -b = \frac{1}{y_i}-\boldsymbol{w}^T\boldsymbol{x}_i, +b = \frac{1}{y_i}-\boldsymbol{x}_1^T\boldsymbol{w}, $$ or if we write it out in terms of the support vectors only, with \( N_s \) being their number, we have @@ -164,7 +164,7 @@ $$ With our hyperplane coefficients we can use our classifier to assign any observation by simply using $$ -y_i = \mathrm{sign}(\boldsymbol{w}^T\boldsymbol{x}_i+b). +y_i = \mathrm{sign}(\boldsymbol{x}_i^T\boldsymbol{w}+b). $$ Below we discuss how to find the optimal values of \( \lambda_i \). Before we proceed however, we discuss now the so-called soft classifier. diff --git a/doc/pub/week47/html/._week47-bs020.html b/doc/pub/week47/html/._week47-bs020.html index 60acf41e1..38363deea 100644 --- a/doc/pub/week47/html/._week47-bs020.html +++ b/doc/pub/week47/html/._week47-bs020.html @@ -144,8 +144,11 @@ MathJax.Hub.Config({ Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.

-Suppose now that classes overlap in feature space, as shown in the -figure here. One way to deal with this problem before we define the +Suppose now that the two classes overlap in feature space, as shown in Figure 12.1 of +Hastie et al. + +

+One way to deal with this problem before we define the so-called kernel approach, is to allow a kind of slack in the sense that we allow some points to be on the wrong side of the margin. @@ -153,17 +156,17 @@ that we allow some points to be on the wrong side of the margin. We introduce thus the so-called slack variables \( \boldsymbol{\xi} =[\xi_1,x_2,\dots,x_n] \) and modify our previous equation $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1, $$ to $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i, $$ with the requirement \( \xi_i\geq 0 \). The total violation is now \( \sum_i\xi \). The value \( \xi_i \) in the constraint the last constraint corresponds to the amount by which the prediction -\( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), +\( y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), we bound the total amount by which predictions fall on the wrong side of their margins.

diff --git a/doc/pub/week47/html/._week47-bs021.html b/doc/pub/week47/html/._week47-bs021.html index d8a08a674..f10afa327 100644 --- a/doc/pub/week47/html/._week47-bs021.html +++ b/doc/pub/week47/html/._week47-bs021.html @@ -148,7 +148,7 @@ $$ subject to $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i \hspace{0.1cm}\forall i, $$ with the requirement \( \xi_i\geq 0 \). @@ -177,7 +177,7 @@ $$ but now subject to the constraints \( \lambda_i\geq 0 \), \( \sum_i\lambda_iy_i=0 \) and \( 0\leq\lambda_i \leq C \). We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads $$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, +\lambda_i\left[y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, $$ $$ @@ -186,7 +186,7 @@ $$ and $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. $$ diff --git a/doc/pub/week47/html/week47-bs.html b/doc/pub/week47/html/week47-bs.html index 1ea0bfbb9..fd20117c5 100644 --- a/doc/pub/week47/html/week47-bs.html +++ b/doc/pub/week47/html/week47-bs.html @@ -157,7 +157,7 @@ MathJax.Hub.Config({

[2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

-

Nov 22, 2020

+

Nov 26, 2020


diff --git a/doc/pub/week47/html/week47-reveal.html b/doc/pub/week47/html/week47-reveal.html index bf6759e92..3268afb24 100644 --- a/doc/pub/week47/html/week47-reveal.html +++ b/doc/pub/week47/html/week47-reveal.html @@ -148,7 +148,7 @@ MathJax.Hub.Config({

[2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

 
-

Nov 22, 2020

+

Nov 26, 2020


@@ -428,7 +428,7 @@ that could be chosen. Our objective is to find a plane that has the maximum margin, i.e the maximum distance between data points of both classes. Maximizing the margin distance provides some reinforcement so that future data points can be classified with -more confidence. +more confidence. Figure 12.1 of Hastie et al is a good illustration.

What a linear classifier attempts to accomplish is to split the @@ -451,14 +451,14 @@ for our data sample. Let us define the function

 
$$ -f(x) = \boldsymbol{w}^T\boldsymbol{x}+b = 0, +f(x) = \boldsymbol{x}^T\boldsymbol{w}+b = 0, $$

 
-as the function that determines the line \( L \) that separates two classes (our two features), see the figure here. +as the function that determines the line \( L \) that separates two classes (our two features), see Figure 12.1 of Hastie et al.

-Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{w}^T(\boldsymbol{x}_1-\boldsymbol{x}_2)=0 \). +Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{x}^T(\boldsymbol{w}_1-\boldsymbol{x}_2)=0 \).

The signed distance \( \delta \) from any point defined by a vector \( \boldsymbol{x} \) and a point \( \boldsymbol{x}_0 \) on the line \( L \) is then @@ -480,7 +480,7 @@ misclassified points \( M \) and attempt to minimize this function

 
$$ -C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b). +C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b). $$

 
@@ -560,7 +560,7 @@ Thus, we wish to find a margin \( M \) with \( \boldsymbol{w} \) normalized to

 
$$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. $$

 
@@ -570,14 +570,14 @@ All points are thus at a signed distance from the decision boundary defined by t We seek thus the largest value \( M \) defined by

 
$$ -\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, +\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, $$

 
or just

 
$$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. $$

 
@@ -590,10 +590,10 @@ $$

 

-We have thus defined our margin as the invers of the norm of +We have thus defined our margin as the inverse of the norm of \( \boldsymbol{w} \). We want to minimize the norm in order to have a as large as possible margin \( M \). Before we proceed, we need to remind ourselves -about Lagrangian multipliers. +about Lagrangian multipliers and optimzation problems. @@ -751,18 +751,21 @@ subject to the constraints \( \lambda_i\geq 0 \) and \( \sum_i\lambda_iy_i=0 \). We must in addition satisfy the Karush-Kuhn-Tucker (KKT) condition

 
$$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -1\right] \hspace{0.1cm}\forall i. +\lambda_i\left[y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) -1\right] \hspace{0.1cm}\forall i. $$

 

    -

  1. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  2. -

  3. If \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).
  4. +

  5. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  6. +

  7. If \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).

When \( \lambda_i > 0 \), the vectors \( \boldsymbol{x}_i \) are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin \( M \). + +

+The support vectors (the points that define the margin \( M \)) are the quantities we keep in order to make predictions. @@ -809,14 +812,14 @@ $$ With our vector \( \boldsymbol{w} \) we can in turn find the value of the intercept \( b \) (here in two dimensions) via

 
$$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1, $$

 
resulting in

 
$$ -b = \frac{1}{y_i}-\boldsymbol{w}^T\boldsymbol{x}_i, +b = \frac{1}{y_i}-\boldsymbol{x}_1^T\boldsymbol{w}, $$

 
@@ -830,7 +833,7 @@ $$ With our hyperplane coefficients we can use our classifier to assign any observation by simply using

 
$$ -y_i = \mathrm{sign}(\boldsymbol{w}^T\boldsymbol{x}_i+b). +y_i = \mathrm{sign}(\boldsymbol{x}_i^T\boldsymbol{w}+b). $$

 
@@ -845,8 +848,11 @@ Below we discuss how to find the optimal values of \( \lambda_i \). Before we pr Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.

-Suppose now that classes overlap in feature space, as shown in the -figure here. One way to deal with this problem before we define the +Suppose now that the two classes overlap in feature space, as shown in Figure 12.1 of +Hastie et al. + +

+One way to deal with this problem before we define the so-called kernel approach, is to allow a kind of slack in the sense that we allow some points to be on the wrong side of the margin. @@ -855,20 +861,20 @@ We introduce thus the so-called slack variables \( \boldsymbol{\xi} =[\xi modify our previous equation

 
$$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1, $$

 
to

 
$$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i, $$

 
with the requirement \( \xi_i\geq 0 \). The total violation is now \( \sum_i\xi \). The value \( \xi_i \) in the constraint the last constraint corresponds to the amount by which the prediction -\( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), +\( y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), we bound the total amount by which predictions fall on the wrong side of their margins.

@@ -891,7 +897,7 @@ $$ subject to

 
$$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i \hspace{0.1cm}\forall i, $$

 
@@ -930,7 +936,7 @@ but now subject to the constraints \( \lambda_i\geq 0 \), \( \sum_i\lambda_iy_i= We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads

 
$$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, +\lambda_i\left[y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, $$

 
@@ -943,7 +949,7 @@ $$ and

 
$$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. $$

 
diff --git a/doc/pub/week47/html/week47-solarized.html b/doc/pub/week47/html/week47-solarized.html index 8c41b4296..c2c0ee733 100644 --- a/doc/pub/week47/html/week47-solarized.html +++ b/doc/pub/week47/html/week47-solarized.html @@ -100,7 +100,7 @@ MathJax.Hub.Config({

[2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

-

Nov 22, 2020

+

Nov 26, 2020












@@ -357,7 +357,7 @@ that could be chosen. Our objective is to find a plane that has the maximum margin, i.e the maximum distance between data points of both classes. Maximizing the margin distance provides some reinforcement so that future data points can be classified with -more confidence. +more confidence. Figure 12.1 of Hastie et al is a good illustration.

What a linear classifier attempts to accomplish is to split the @@ -379,13 +379,13 @@ for our data sample.

Let us define the function $$ -f(x) = \boldsymbol{w}^T\boldsymbol{x}+b = 0, +f(x) = \boldsymbol{x}^T\boldsymbol{w}+b = 0, $$ -as the function that determines the line \( L \) that separates two classes (our two features), see the figure here. +as the function that determines the line \( L \) that separates two classes (our two features), see Figure 12.1 of Hastie et al.

-Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{w}^T(\boldsymbol{x}_1-\boldsymbol{x}_2)=0 \). +Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{x}^T(\boldsymbol{w}_1-\boldsymbol{x}_2)=0 \).

The signed distance \( \delta \) from any point defined by a vector \( \boldsymbol{x} \) and a point \( \boldsymbol{x}_0 \) on the line \( L \) is then @@ -404,7 +404,7 @@ do is to define a cost function which now contains the set of all misclassified points \( M \) and attempt to minimize this function $$ -C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b). +C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b). $$

@@ -474,7 +474,7 @@ Thus, we wish to find a margin \( M \) with \( \boldsymbol{w} \) normalized to \( \vert\vert \boldsymbol{w}\vert\vert =1 \) subject to the condition $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. $$ All points are thus at a signed distance from the decision boundary defined by the line \( L \). The parameters \( b \) and \( w_1 \) and \( w_2 \) define this line. @@ -482,12 +482,12 @@ All points are thus at a signed distance from the decision boundary defined by t

We seek thus the largest value \( M \) defined by $$ -\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, +\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, $$ or just $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. $$ If we scale the equation so that \( \vert \vert \boldsymbol{w}\vert\vert = 1/M \), we have to find the minimum of @@ -497,10 +497,10 @@ y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq 1 \hspace{0.1cm}\forall i. $$

-We have thus defined our margin as the invers of the norm of +We have thus defined our margin as the inverse of the norm of \( \boldsymbol{w} \). We want to minimize the norm in order to have a as large as possible margin \( M \). Before we proceed, we need to remind ourselves -about Lagrangian multipliers. +about Lagrangian multipliers and optimzation problems.











@@ -625,17 +625,20 @@ $$ subject to the constraints \( \lambda_i\geq 0 \) and \( \sum_i\lambda_iy_i=0 \). We must in addition satisfy the Karush-Kuhn-Tucker (KKT) condition $$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -1\right] \hspace{0.1cm}\forall i. +\lambda_i\left[y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) -1\right] \hspace{0.1cm}\forall i. $$

    -
  1. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  2. -
  3. If \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).
  4. +
  5. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  6. +
  7. If \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).
When \( \lambda_i > 0 \), the vectors \( \boldsymbol{x}_i \) are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin \( M \). +

+The support vectors (the points that define the margin \( M \)) are the quantities we keep in order to make predictions. +











@@ -674,12 +677,12 @@ $$ With our vector \( \boldsymbol{w} \) we can in turn find the value of the intercept \( b \) (here in two dimensions) via $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1, $$ resulting in $$ -b = \frac{1}{y_i}-\boldsymbol{w}^T\boldsymbol{x}_i, +b = \frac{1}{y_i}-\boldsymbol{x}_1^T\boldsymbol{w}, $$ or if we write it out in terms of the support vectors only, with \( N_s \) being their number, we have @@ -689,7 +692,7 @@ $$ With our hyperplane coefficients we can use our classifier to assign any observation by simply using $$ -y_i = \mathrm{sign}(\boldsymbol{w}^T\boldsymbol{x}_i+b). +y_i = \mathrm{sign}(\boldsymbol{x}_i^T\boldsymbol{w}+b). $$ Below we discuss how to find the optimal values of \( \lambda_i \). Before we proceed however, we discuss now the so-called soft classifier. @@ -703,8 +706,11 @@ Below we discuss how to find the optimal values of \( \lambda_i \). Before we pr Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.

-Suppose now that classes overlap in feature space, as shown in the -figure here. One way to deal with this problem before we define the +Suppose now that the two classes overlap in feature space, as shown in Figure 12.1 of +Hastie et al. + +

+One way to deal with this problem before we define the so-called kernel approach, is to allow a kind of slack in the sense that we allow some points to be on the wrong side of the margin. @@ -712,17 +718,17 @@ that we allow some points to be on the wrong side of the margin. We introduce thus the so-called slack variables \( \boldsymbol{\xi} =[\xi_1,x_2,\dots,x_n] \) and modify our previous equation $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1, $$ to $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i, $$ with the requirement \( \xi_i\geq 0 \). The total violation is now \( \sum_i\xi \). The value \( \xi_i \) in the constraint the last constraint corresponds to the amount by which the prediction -\( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), +\( y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), we bound the total amount by which predictions fall on the wrong side of their margins.

@@ -742,7 +748,7 @@ $$ subject to $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i \hspace{0.1cm}\forall i, $$ with the requirement \( \xi_i\geq 0 \). @@ -771,7 +777,7 @@ $$ but now subject to the constraints \( \lambda_i\geq 0 \), \( \sum_i\lambda_iy_i=0 \) and \( 0\leq\lambda_i \leq C \). We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads $$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, +\lambda_i\left[y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, $$ $$ @@ -780,7 +786,7 @@ $$ and $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. $$ diff --git a/doc/pub/week47/html/week47.html b/doc/pub/week47/html/week47.html index 74e8442d2..660134bba 100644 --- a/doc/pub/week47/html/week47.html +++ b/doc/pub/week47/html/week47.html @@ -105,7 +105,7 @@ MathJax.Hub.Config({

[2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

-

Nov 22, 2020

+

Nov 26, 2020












@@ -362,7 +362,7 @@ that could be chosen. Our objective is to find a plane that has the maximum margin, i.e the maximum distance between data points of both classes. Maximizing the margin distance provides some reinforcement so that future data points can be classified with -more confidence. +more confidence. Figure 12.1 of Hastie et al is a good illustration.

What a linear classifier attempts to accomplish is to split the @@ -384,13 +384,13 @@ for our data sample.

Let us define the function $$ -f(x) = \boldsymbol{w}^T\boldsymbol{x}+b = 0, +f(x) = \boldsymbol{x}^T\boldsymbol{w}+b = 0, $$ -as the function that determines the line \( L \) that separates two classes (our two features), see the figure here. +as the function that determines the line \( L \) that separates two classes (our two features), see Figure 12.1 of Hastie et al.

-Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{w}^T(\boldsymbol{x}_1-\boldsymbol{x}_2)=0 \). +Any point defined by \( \boldsymbol{x}_i \) and \( \boldsymbol{x}_2 \) on the line \( L \) will satisfy \( \boldsymbol{x}^T(\boldsymbol{w}_1-\boldsymbol{x}_2)=0 \).

The signed distance \( \delta \) from any point defined by a vector \( \boldsymbol{x} \) and a point \( \boldsymbol{x}_0 \) on the line \( L \) is then @@ -409,7 +409,7 @@ do is to define a cost function which now contains the set of all misclassified points \( M \) and attempt to minimize this function $$ -C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b). +C(\boldsymbol{w},b) = -\sum_{i\in M} y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b). $$

@@ -479,7 +479,7 @@ Thus, we wish to find a margin \( M \) with \( \boldsymbol{w} \) normalized to \( \vert\vert \boldsymbol{w}\vert\vert =1 \) subject to the condition $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. $$ All points are thus at a signed distance from the decision boundary defined by the line \( L \). The parameters \( b \) and \( w_1 \) and \( w_2 \) define this line. @@ -487,12 +487,12 @@ All points are thus at a signed distance from the decision boundary defined by t

We seek thus the largest value \( M \) defined by $$ -\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, +\frac{1}{\vert \vert \boldsymbol{w}\vert\vert}y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, $$ or just $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) \geq M\vert \vert \boldsymbol{w}\vert\vert \hspace{0.1cm}\forall i. $$ If we scale the equation so that \( \vert \vert \boldsymbol{w}\vert\vert = 1/M \), we have to find the minimum of @@ -502,10 +502,10 @@ y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) \geq 1 \hspace{0.1cm}\forall i. $$

-We have thus defined our margin as the invers of the norm of +We have thus defined our margin as the inverse of the norm of \( \boldsymbol{w} \). We want to minimize the norm in order to have a as large as possible margin \( M \). Before we proceed, we need to remind ourselves -about Lagrangian multipliers. +about Lagrangian multipliers and optimzation problems.











@@ -630,17 +630,20 @@ $$ subject to the constraints \( \lambda_i\geq 0 \) and \( \sum_i\lambda_iy_i=0 \). We must in addition satisfy the Karush-Kuhn-Tucker (KKT) condition $$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -1\right] \hspace{0.1cm}\forall i. +\lambda_i\left[y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b) -1\right] \hspace{0.1cm}\forall i. $$

    -
  1. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  2. -
  3. If \( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).
  4. +
  5. If \( \lambda_i > 0 \), then \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1 \) and we say that \( x_i \) is on the boundary.
  6. +
  7. If \( y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)> 1 \), we say \( x_i \) is not on the boundary and we set \( \lambda_i=0 \).
When \( \lambda_i > 0 \), the vectors \( \boldsymbol{x}_i \) are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin \( M \). +

+The support vectors (the points that define the margin \( M \)) are the quantities we keep in order to make predictions. +











@@ -679,12 +682,12 @@ $$ With our vector \( \boldsymbol{w} \) we can in turn find the value of the intercept \( b \) (here in two dimensions) via $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}^T\boldsymbol{w}_i+b)=1, $$ resulting in $$ -b = \frac{1}{y_i}-\boldsymbol{w}^T\boldsymbol{x}_i, +b = \frac{1}{y_i}-\boldsymbol{x}_1^T\boldsymbol{w}, $$ or if we write it out in terms of the support vectors only, with \( N_s \) being their number, we have @@ -694,7 +697,7 @@ $$ With our hyperplane coefficients we can use our classifier to assign any observation by simply using $$ -y_i = \mathrm{sign}(\boldsymbol{w}^T\boldsymbol{x}_i+b). +y_i = \mathrm{sign}(\boldsymbol{x}_i^T\boldsymbol{w}+b). $$ Below we discuss how to find the optimal values of \( \lambda_i \). Before we proceed however, we discuss now the so-called soft classifier. @@ -708,8 +711,11 @@ Below we discuss how to find the optimal values of \( \lambda_i \). Before we pr Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.

-Suppose now that classes overlap in feature space, as shown in the -figure here. One way to deal with this problem before we define the +Suppose now that the two classes overlap in feature space, as shown in Figure 12.1 of +Hastie et al. + +

+One way to deal with this problem before we define the so-called kernel approach, is to allow a kind of slack in the sense that we allow some points to be on the wrong side of the margin. @@ -717,17 +723,17 @@ that we allow some points to be on the wrong side of the margin. We introduce thus the so-called slack variables \( \boldsymbol{\xi} =[\xi_1,x_2,\dots,x_n] \) and modify our previous equation $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1, +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1, $$ to $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i, $$ with the requirement \( \xi_i\geq 0 \). The total violation is now \( \sum_i\xi \). The value \( \xi_i \) in the constraint the last constraint corresponds to the amount by which the prediction -\( y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), +\( y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b)=1 \) is on the wrong side of its margin. Hence by bounding the sum \( \sum_i \xi_i \), we bound the total amount by which predictions fall on the wrong side of their margins.

@@ -747,7 +753,7 @@ $$ subject to $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i, +y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b)=1-\xi_i \hspace{0.1cm}\forall i, $$ with the requirement \( \xi_i\geq 0 \). @@ -776,7 +782,7 @@ $$ but now subject to the constraints \( \lambda_i\geq 0 \), \( \sum_i\lambda_iy_i=0 \) and \( 0\leq\lambda_i \leq C \). We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads $$ -\lambda_i\left[y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, +\lambda_i\left[y_i(\boldsymbol{x}_1^T\boldsymbol{w}+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, $$ $$ @@ -785,7 +791,7 @@ $$ and $$ -y_i(\boldsymbol{w}^T\boldsymbol{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. +y_i(\boldsymbol{x}_i^T\boldsymbol{w}+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. $$ diff --git a/doc/pub/week47/ipynb/ipynb-week47-src.tar.gz b/doc/pub/week47/ipynb/ipynb-week47-src.tar.gz index 0f6352a3b..caaf2e5c8 100644 Binary files a/doc/pub/week47/ipynb/ipynb-week47-src.tar.gz and b/doc/pub/week47/ipynb/ipynb-week47-src.tar.gz differ diff --git a/doc/pub/week47/ipynb/week47.ipynb b/doc/pub/week47/ipynb/week47.ipynb index 4dd1d4c0b..8a476bec3 100644 --- a/doc/pub/week47/ipynb/week47.ipynb +++ b/doc/pub/week47/ipynb/week47.ipynb @@ -10,7 +10,7 @@ " \n", "**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n", "\n", - "Date: **Nov 22, 2020**\n", + "Date: **Nov 26, 2020**\n", "\n", "Copyright 1999-2020, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license\n", "\n", @@ -98,30 +98,10 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "LinearSVC: [0.28475098] [[1.05364854 1.09903804]]\n", - "SVC: [0.31896852] [[1.1203284 1.02625193]]\n", - "SGDClassifier(alpha=0.00200): [0.117] [[0.77714169 0.72981762]]\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAqcAAAESCAYAAADACnxfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzdd1xX1f/A8deRJUMDU0HFESKSWzFXpjhzVJZoGu6RpumvobYsNbVs2viaM3Cn5sys/Grf3KmJZm5xoLhw7wEI5/fHgQ8jQD4sGe/n43EfcT/33nPPRdI3557zfiutNUIIIYQQQuQGhR52B4QQQgghhIgnwakQQgghhMg1JDgVQgghhBC5hgSnQgghhBAi15DgVAghhBBC5BoSnAohhBBCiFxDglMhhBBCCJFr5FhwqpRyUEoFKaVOKqVuKqX+Vkq1TeP8N5RSEUqp60qpYKWUQ6JjxZRSy5VSt+PaC8yZpxBCCCGEENkpJ0dObYFTQFPgEeAD4EelVIXkJyqlngbeAVoAFQAv4MNEp3wHRAHuQDdgilKqavZ1XQghhBBC5AT1MCtEKaX2AB9qrZcm+/wH4ITW+r24/RbAfK21h1LKGbgKVNNah8Ydnwuc0Vq/k7NPIIQQQgghspLtw7qxUsod8AH2p3C4KvBTov1/AHel1KNAOSAmPjBNdLxpKvcZAAwAcHZ29vP19c2C3gshhBBCiMzYuXPnJa11ieSfP5TgVCllB8wHZmutD6VwigtwPdF+/NdFUj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0Dm3G1gG9DWzufi0VC+SHvTl11PAZDNbA0zEb2pqBrR1zj0QZB9fAkuB8YECABWBfwT6SptRze6eREQKnR69iIjkzWPAE8B9wGJ8cNeLQLqlwPrLu4CB+PWXHwfOuxkfyP4ATADGkcs61dw456YB3fDrWL8PvB7i+CUHOfWRit9hHx04fzzwLD4wPZjLPYmIFDpL38wpIiICZtYCn+qqjXPuh+Iej4iULQpORUTKODPrCewDfgPq4R/rG9DK6ZeEiBQxrTkVEZEq+OT8dYCdQCJwtwJTESkOmjkVERERkbChDVEiIiIiEjYUnIqIiIhI2FBwKiIiIiJhQ8GpiIiIiIQNBaciIiIiEjb+H5ZwzWvT7w/PAAAAAElFTkSuQmCC\n", - "text/plain": [ - "

" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], + "metadata": { + "collapsed": false + }, + "outputs": [], "source": [ "%matplotlib inline\n", "\n", @@ -343,7 +323,7 @@ "plane that has the maximum margin, i.e the maximum distance between\n", "data points of both classes. Maximizing the margin distance provides\n", "some reinforcement so that future data points can be classified with\n", - "more confidence.\n", + "more confidence. Figure 12.1 of Hastie et al is a good illustration.\n", "\n", "What a linear classifier attempts to accomplish is to split the\n", "feature space into two half spaces by placing a hyperplane between the\n", @@ -365,7 +345,7 @@ "metadata": {}, "source": [ "$$\n", - "f(x) = \\boldsymbol{w}^T\\boldsymbol{x}+b = 0,\n", + "f(x) = \\boldsymbol{x}^T\\boldsymbol{w}+b = 0,\n", "$$" ] }, @@ -373,10 +353,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "as the function that determines the line $L$ that separates two classes (our two features), see the figure here. \n", + "as the function that determines the line $L$ that separates two classes (our two features), see Figure 12.1 of [Hastie et al](https://www.springer.com/gp/book/9780387848570).\n", "\n", "\n", - "Any point defined by $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_2$ on the line $L$ will satisfy $\\boldsymbol{w}^T(\\boldsymbol{x}_1-\\boldsymbol{x}_2)=0$. \n", + "Any point defined by $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_2$ on the line $L$ will satisfy $\\boldsymbol{x}^T(\\boldsymbol{w}_1-\\boldsymbol{x}_2)=0$. \n", "\n", "The signed distance $\\delta$ from any point defined by a vector $\\boldsymbol{x}$ and a point $\\boldsymbol{x}_0$ on the line $L$ is then" ] @@ -406,7 +386,7 @@ "metadata": {}, "source": [ "$$\n", - "C(\\boldsymbol{w},b) = -\\sum_{i\\in M} y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n", + "C(\\boldsymbol{w},b) = -\\sum_{i\\in M} y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b).\n", "$$" ] }, @@ -517,7 +497,7 @@ "metadata": {}, "source": [ "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, p.\n", + "y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, p.\n", "$$" ] }, @@ -535,7 +515,7 @@ "metadata": {}, "source": [ "$$\n", - "\\frac{1}{\\vert \\vert \\boldsymbol{w}\\vert\\vert}y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, n,\n", + "\\frac{1}{\\vert \\vert \\boldsymbol{w}\\vert\\vert}y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b) \\geq M \\hspace{0.1cm}\\forall i=1,2,\\dots, n,\n", "$$" ] }, @@ -551,7 +531,7 @@ "metadata": {}, "source": [ "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) \\geq M\\vert \\vert \\boldsymbol{w}\\vert\\vert \\hspace{0.1cm}\\forall i.\n", + "y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b) \\geq M\\vert \\vert \\boldsymbol{w}\\vert\\vert \\hspace{0.1cm}\\forall i.\n", "$$" ] }, @@ -576,10 +556,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We have thus defined our margin as the invers of the norm of\n", + "We have thus defined our margin as the inverse of the norm of\n", "$\\boldsymbol{w}$. We want to minimize the norm in order to have a as large as\n", "possible margin $M$. Before we proceed, we need to remind ourselves\n", - "about Lagrangian multipliers.\n", + "about Lagrangian multipliers and optimzation problems.\n", "\n", "## A quick Reminder on Lagrangian Multipliers\n", "\n", @@ -872,7 +852,7 @@ "metadata": {}, "source": [ "$$\n", - "\\lambda_i\\left[y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -1\\right] \\hspace{0.1cm}\\forall i.\n", + "\\lambda_i\\left[y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b) -1\\right] \\hspace{0.1cm}\\forall i.\n", "$$" ] }, @@ -880,11 +860,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "1. If $\\lambda_i > 0$, then $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ and we say that $x_i$ is on the boundary.\n", + "1. If $\\lambda_i > 0$, then $y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b)=1$ and we say that $x_i$ is on the boundary.\n", "\n", - "2. If $y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\\lambda_i=0$. \n", + "2. If $y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\\lambda_i=0$. \n", "\n", - "When $\\lambda_i > 0$, the vectors $\\boldsymbol{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$. \n", + "When $\\lambda_i > 0$, the vectors $\\boldsymbol{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$. \n", + "\n", + "The support vectors (the points that define the margin $M$) are the quantities we keep in order to make predictions.\n", "\n", "## The problem to solve\n", "\n", @@ -956,7 +938,7 @@ "metadata": {}, "source": [ "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n", + "y_i(\\boldsymbol{x}^T\\boldsymbol{w}_i+b)=1,\n", "$$" ] }, @@ -972,7 +954,7 @@ "metadata": {}, "source": [ "$$\n", - "b = \\frac{1}{y_i}-\\boldsymbol{w}^T\\boldsymbol{x}_i,\n", + "b = \\frac{1}{y_i}-\\boldsymbol{x}_1^T\\boldsymbol{w},\n", "$$" ] }, @@ -1004,7 +986,7 @@ "metadata": {}, "source": [ "$$\n", - "y_i = \\mathrm{sign}(\\boldsymbol{w}^T\\boldsymbol{x}_i+b).\n", + "y_i = \\mathrm{sign}(\\boldsymbol{x}_i^T\\boldsymbol{w}+b).\n", "$$" ] }, @@ -1018,8 +1000,10 @@ "\n", "Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined.\n", "\n", - "Suppose now that classes overlap in feature space, as shown in the\n", - "figure here. One way to deal with this problem before we define the\n", + "Suppose now that the two classes overlap in feature space, as shown in Figure 12.1 of\n", + "[Hastie et al](https://www.springer.com/gp/book/9780387848570).\n", + "\n", + "One way to deal with this problem before we define the\n", "so-called **kernel approach**, is to allow a kind of slack in the sense\n", "that we allow some points to be on the wrong side of the margin.\n", "\n", @@ -1032,7 +1016,7 @@ "metadata": {}, "source": [ "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1,\n", + "y_i(\\boldsymbol{x}_i^T\\boldsymbol{w}+b)=1,\n", "$$" ] }, @@ -1048,7 +1032,7 @@ "metadata": {}, "source": [ "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i,\n", + "y_i(\\boldsymbol{x}_1^T\\boldsymbol{w}+b)=1-\\xi_i,\n", "$$" ] }, @@ -1058,7 +1042,7 @@ "source": [ "with the requirement $\\xi_i\\geq 0$. The total violation is now $\\sum_i\\xi$. \n", "The value $\\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction\n", - "$y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\\sum_i \\xi_i$,\n", + "$y_i(\\boldsymbol{x}_i^T\\boldsymbol{w}+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\\sum_i \\xi_i$,\n", "we bound the total amount by which predictions fall on the wrong side of their margins.\n", "\n", "Misclassifications occur when $\\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of\n", @@ -1091,7 +1075,7 @@ "metadata": {}, "source": [ "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b)=1-\\xi_i \\hspace{0.1cm}\\forall i,\n", + "y_i(\\boldsymbol{x}_1^T\\boldsymbol{w}+b)=1-\\xi_i \\hspace{0.1cm}\\forall i,\n", "$$" ] }, @@ -1214,760 +1198,12 @@ "metadata": {}, "source": [ "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{x}_i+b) -(1-\\xi_) \\geq 0 \\hspace{0.1cm}\\forall i.\n", + "y_i(\\boldsymbol{x}_i^T\\boldsymbol{w}+b) -(1-\\xi_) \\geq 0 \\hspace{0.1cm}\\forall i.\n", "$$" ] -<<<<<<< HEAD - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Kernels and non-linearity\n", - "\n", - "The cases we have studied till now, were all characterized by two classes\n", - "with a close to linear separability. The classifiers we have described\n", - "so far find linear boundaries in our input feature space. It is\n", - "possible to make our procedure more flexible by exploring the feature\n", - "space using other basis expansions such as higher-order polynomials,\n", - "wavelets, splines etc.\n", - "\n", - "If our feature space is not easy to separate, as shown in the figure\n", - "here, we can achieve a better separation by introducing more complex\n", - "basis functions. The ideal would be, as shown in the next figure, to, via a specific transformation to \n", - "obtain a separation between the classes which is almost linear. \n", - "\n", - "The change of basis, from $x\\rightarrow z=\\phi(x)$ leads to the same type of equations to be solved, except that\n", - "we need to introduce for example a polynomial transformation to a two-dimensional training set." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBOR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VUmS1ovzvGrPYKziIuI1dP60NrOwaHvVdpn5xcx8R2Z+FpjvV32SpO44z2tQGIxVVERcDXwCuBt4LnAP8PqIeGbRwiRJ68J5XoPEYKxiIuKFwGeBQ8BLM/Mw8C5gI+BnWkrSgHOe16AxGKuIhc+1/AJwBPiVzJwGWPjz2SRwTUS8qGCJkqQuOM9rEBmM1XcR8XQ6H9OTwMsy89vLNnn7wn8/0NfCJEnrwnleg2pj6QI0ejLzPmDLadZ/FYj+VSRJWk/O8xpUBmMNjIjYBDx94dfHAT8dEZcDP8zM+8tVJklaD87zKs1vvtPAiIgG8PWKVZ/IzNf2txpJ0npznldpBmNJkiQJ33wnSZIkAQZjSZIkCTAYS5IkSYDBWJIkSQIMxpIkSRJgMJYkSZIAg7EkSZIEGIwlSZIkAP4fCcOTTWQGCKIAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "import numpy as np\n", - "import os\n", - "\n", - "np.random.seed(42)\n", - "\n", - "# To plot pretty figures\n", - "import matplotlib\n", - "import matplotlib.pyplot as plt\n", - "plt.rcParams['axes.labelsize'] = 14\n", - "plt.rcParams['xtick.labelsize'] = 12\n", - "plt.rcParams['ytick.labelsize'] = 12\n", - "\n", - "\n", - "from sklearn.svm import SVC\n", - "from sklearn import datasets\n", - "\n", - "\n", - "\n", - "X1D = np.linspace(-4, 4, 9).reshape(-1, 1)\n", - "X2D = np.c_[X1D, X1D**2]\n", - "y = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n", - "\n", - "plt.figure(figsize=(11, 4))\n", - "\n", - "plt.subplot(121)\n", - "plt.grid(True, which='both')\n", - "plt.axhline(y=0, color='k')\n", - "plt.plot(X1D[:, 0][y==0], np.zeros(4), \"bs\")\n", - "plt.plot(X1D[:, 0][y==1], np.zeros(5), \"g^\")\n", - "plt.gca().get_yaxis().set_ticks([])\n", - "plt.xlabel(r\"$x_1$\", fontsize=20)\n", - "plt.axis([-4.5, 4.5, -0.2, 0.2])\n", - "\n", - "plt.subplot(122)\n", - "plt.grid(True, which='both')\n", - "plt.axhline(y=0, color='k')\n", - "plt.axvline(x=0, color='k')\n", - "plt.plot(X2D[:, 0][y==0], X2D[:, 1][y==0], \"bs\")\n", - "plt.plot(X2D[:, 0][y==1], X2D[:, 1][y==1], \"g^\")\n", - "plt.xlabel(r\"$x_1$\", fontsize=20)\n", - "plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n", - "plt.gca().get_yaxis().set_ticks([0, 4, 8, 12, 16])\n", - "plt.plot([-4.5, 4.5], [6.5, 6.5], \"r--\", linewidth=3)\n", - "plt.axis([-4.5, 4.5, -1, 17])\n", - "plt.subplots_adjust(right=1)\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## The equations\n", - "\n", - "Suppose we define a polynomial transformation of degree two only (we continue to live in a plane with $x_i$ and $y_i$ as variables)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "z = \\phi(x_i) =\\left(x_i^2, y_i^2, \\sqrt{2}x_iy_i\\right).\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "With our new basis, the equations we solved earlier are basically the same, that is we have now (without the slack option for simplicity)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{z}_i^T\\boldsymbol{z}_j,\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$, and for the support vectors" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "y_i(\\boldsymbol{w}^T\\boldsymbol{z}_i+b)= 1 \\hspace{0.1cm}\\forall i,\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "from which we also find $b$.\n", - "To compute $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we define the kernel $K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$ as" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\boldsymbol{z}_i^T\\boldsymbol{z}_j= \\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "For the above example, the kernel reads" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=[x_i^2, y_i^2, \\sqrt{2}x_iy_i]^T\\begin{bmatrix} x_j^2 \\\\ y_j^2 \\\\ \\sqrt{2}x_jy_j \\end{bmatrix}=x_i^2x_j^2+2x_ix_jy_iy_j+y_i^2y_j^2.\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We note that this is nothing but the dot product of the two original\n", - "vectors $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$. Instead of thus computing the\n", - "product in the Lagrangian of $\\boldsymbol{z}_i^T\\boldsymbol{z}_j$ we simply compute\n", - "the dot product $(\\boldsymbol{x}_i^T\\boldsymbol{x}_j)^2$.\n", - "\n", - "\n", - "This leads to the so-called\n", - "kernel trick and the result leads to the same as if we went through\n", - "the trouble of performing the transformation\n", - "$\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j)$ during the SVM calculations.\n", - "\n", - "\n", - "## The problem to solve\n", - "Using our definition of the kernel We can rewrite again the Lagrangian" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "{\\cal L}=\\sum_i\\lambda_i-\\frac{1}{2}\\sum_{ij}^n\\lambda_i\\lambda_jy_iy_j\\boldsymbol{x}_i^T\\boldsymbol{z}_j,\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "subject to the constraints $\\lambda_i\\geq 0$, $\\sum_i\\lambda_iy_i=0$ in terms of a convex optimization problem" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n", - "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n", - "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", - "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", - "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n", - "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{1}\\boldsymbol{\\lambda},\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n", - "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n", - "If we add the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$.\n", - "\n", - "We can rewrite this (see the solutions below) in terms of a convex optimization problem of the type" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\begin{align*}\n", - " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n", - " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\hspace{0.2cm} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n", - "\\end{align*}\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Below we discuss how to solve these equations. Here we note that the matrix $\\boldsymbol{P}$ has matrix elements $p_{ij}=y_iy_jK(\\boldsymbol{x}_i,\\boldsymbol{x}_j)$.\n", - "Given a kernel $K$ and the targets $y_i$ this matrix is easy to set up. The constraint $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$ leads to $f=0$ and $\\boldsymbol{A}=\\boldsymbol{y}$. How to set up the matrix $\\boldsymbol{G}$ is discussed later. Here note that the inequalities $0\\leq \\lambda_i \\leq C$ can be split up into\n", - "$0\\leq \\lambda_i$ and $\\lambda_i \\leq C$. These two inequalities define then the matrix $\\boldsymbol{G}$ and the vector $\\boldsymbol{h}$.\n", - "\n", - "\n", - "## Different kernels and Mercer's theorem\n", - "\n", - "There are several popular kernels being used. These are\n", - "1. Linear: $K(\\boldsymbol{x},\\boldsymbol{y})=\\boldsymbol{x}^T\\boldsymbol{y}$,\n", - "\n", - "2. Polynomial: $K(\\boldsymbol{x},\\boldsymbol{y})=(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)^d$,\n", - "\n", - "3. Gaussian Radial Basis Function: $K(\\boldsymbol{x},\\boldsymbol{y})=\\exp{\\left(-\\gamma\\vert\\vert\\boldsymbol{x}-\\boldsymbol{y}\\vert\\vert^2\\right)}$,\n", - "\n", - "4. Tanh: $K(\\boldsymbol{x},\\boldsymbol{y})=\\tanh{(\\boldsymbol{x}^T\\boldsymbol{y}+\\gamma)}$,\n", - "\n", - "and many other ones.\n", - "\n", - "An important theorem for us is [Mercer's\n", - "theorem](https://en.wikipedia.org/wiki/Mercer%27s_theorem). The\n", - "theorem states that if a kernel function $K$ is symmetric, continuous\n", - "and leads to a positive semi-definite matrix $\\boldsymbol{P}$ then there\n", - "exists a function $\\phi$ that maps $\\boldsymbol{x}_i$ and $\\boldsymbol{x}_j$ into\n", - "another space (possibly with much higher dimensions) such that" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "K(\\boldsymbol{x}_i,\\boldsymbol{x}_j)=\\phi(\\boldsymbol{x}_i)^T\\phi(\\boldsymbol{x}_j).\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "So you can use $K$ as a kernel since you know $\\phi$ exists, even if\n", - "you don’t know what $\\phi$ is. \n", - "\n", - "Note that some frequently used kernels (such as the Sigmoid kernel)\n", - "don’t respect all of Mercer’s conditions, yet they generally work well\n", - "in practice.\n", - "\n", - "\n", - "## The moons example" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "from __future__ import division, print_function, unicode_literals\n", - "\n", - "import numpy as np\n", - "np.random.seed(42)\n", - "\n", - "import matplotlib\n", - "import matplotlib.pyplot as plt\n", - "plt.rcParams['axes.labelsize'] = 14\n", - "plt.rcParams['xtick.labelsize'] = 12\n", - "plt.rcParams['ytick.labelsize'] = 12\n", - "\n", - "\n", - "from sklearn.svm import SVC\n", - "from sklearn import datasets\n", - "\n", - "\n", - "\n", - "from sklearn.pipeline import Pipeline\n", - "from sklearn.preprocessing import StandardScaler\n", - "from sklearn.svm import LinearSVC\n", - "\n", - "\n", - "from sklearn.datasets import make_moons\n", - "X, y = make_moons(n_samples=100, noise=0.15, random_state=42)\n", - "\n", - "def plot_dataset(X, y, axes):\n", - " plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"bs\")\n", - " plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"g^\")\n", - " plt.axis(axes)\n", - " plt.grid(True, which='both')\n", - " plt.xlabel(r\"$x_1$\", fontsize=20)\n", - " plt.ylabel(r\"$x_2$\", fontsize=20, rotation=0)\n", - "\n", - "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", - "plt.show()\n", - "\n", - "from sklearn.datasets import make_moons\n", - "from sklearn.pipeline import Pipeline\n", - "from sklearn.preprocessing import PolynomialFeatures\n", - "\n", - "polynomial_svm_clf = Pipeline([\n", - " (\"poly_features\", PolynomialFeatures(degree=3)),\n", - " (\"scaler\", StandardScaler()),\n", - " (\"svm_clf\", LinearSVC(C=10, loss=\"hinge\", random_state=42))\n", - " ])\n", - "\n", - "polynomial_svm_clf.fit(X, y)\n", - "\n", - "def plot_predictions(clf, axes):\n", - " x0s = np.linspace(axes[0], axes[1], 100)\n", - " x1s = np.linspace(axes[2], axes[3], 100)\n", - " x0, x1 = np.meshgrid(x0s, x1s)\n", - " X = np.c_[x0.ravel(), x1.ravel()]\n", - " y_pred = clf.predict(X).reshape(x0.shape)\n", - " y_decision = clf.decision_function(X).reshape(x0.shape)\n", - " plt.contourf(x0, x1, y_pred, cmap=plt.cm.brg, alpha=0.2)\n", - " plt.contourf(x0, x1, y_decision, cmap=plt.cm.brg, alpha=0.1)\n", - "\n", - "plot_predictions(polynomial_svm_clf, [-1.5, 2.5, -1, 1.5])\n", - "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", - "\n", - "plt.show()\n", - "\n", - "\n", - "from sklearn.svm import SVC\n", - "\n", - "poly_kernel_svm_clf = Pipeline([\n", - " (\"scaler\", StandardScaler()),\n", - " (\"svm_clf\", SVC(kernel=\"poly\", degree=3, coef0=1, C=5))\n", - " ])\n", - "poly_kernel_svm_clf.fit(X, y)\n", - "\n", - "poly100_kernel_svm_clf = Pipeline([\n", - " (\"scaler\", StandardScaler()),\n", - " (\"svm_clf\", SVC(kernel=\"poly\", degree=10, coef0=100, C=5))\n", - " ])\n", - "poly100_kernel_svm_clf.fit(X, y)\n", - "\n", - "plt.figure(figsize=(11, 4))\n", - "\n", - "plt.subplot(121)\n", - "plot_predictions(poly_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n", - "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", - "plt.title(r\"$d=3, r=1, C=5$\", fontsize=18)\n", - "\n", - "plt.subplot(122)\n", - "plot_predictions(poly100_kernel_svm_clf, [-1.5, 2.5, -1, 1.5])\n", - "plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", - "plt.title(r\"$d=10, r=100, C=5$\", fontsize=18)\n", - "\n", - "plt.show()\n", - "\n", - "def gaussian_rbf(x, landmark, gamma):\n", - " return np.exp(-gamma * np.linalg.norm(x - landmark, axis=1)**2)\n", - "\n", - "gamma = 0.3\n", - "\n", - "x1s = np.linspace(-4.5, 4.5, 200).reshape(-1, 1)\n", - "x2s = gaussian_rbf(x1s, -2, gamma)\n", - "x3s = gaussian_rbf(x1s, 1, gamma)\n", - "\n", - "XK = np.c_[gaussian_rbf(X1D, -2, gamma), gaussian_rbf(X1D, 1, gamma)]\n", - "yk = np.array([0, 0, 1, 1, 1, 1, 1, 0, 0])\n", - "\n", - "plt.figure(figsize=(11, 4))\n", - "\n", - "plt.subplot(121)\n", - "plt.grid(True, which='both')\n", - "plt.axhline(y=0, color='k')\n", - "plt.scatter(x=[-2, 1], y=[0, 0], s=150, alpha=0.5, c=\"red\")\n", - "plt.plot(X1D[:, 0][yk==0], np.zeros(4), \"bs\")\n", - "plt.plot(X1D[:, 0][yk==1], np.zeros(5), \"g^\")\n", - "plt.plot(x1s, x2s, \"g--\")\n", - "plt.plot(x1s, x3s, \"b:\")\n", - "plt.gca().get_yaxis().set_ticks([0, 0.25, 0.5, 0.75, 1])\n", - "plt.xlabel(r\"$x_1$\", fontsize=20)\n", - "plt.ylabel(r\"Similarity\", fontsize=14)\n", - "plt.annotate(r'$\\mathbf{x}$',\n", - " xy=(X1D[3, 0], 0),\n", - " xytext=(-0.5, 0.20),\n", - " ha=\"center\",\n", - " arrowprops=dict(facecolor='black', shrink=0.1),\n", - " fontsize=18,\n", - " )\n", - "plt.text(-2, 0.9, \"$x_2$\", ha=\"center\", fontsize=20)\n", - "plt.text(1, 0.9, \"$x_3$\", ha=\"center\", fontsize=20)\n", - "plt.axis([-4.5, 4.5, -0.1, 1.1])\n", - "\n", - "plt.subplot(122)\n", - "plt.grid(True, which='both')\n", - "plt.axhline(y=0, color='k')\n", - "plt.axvline(x=0, color='k')\n", - "plt.plot(XK[:, 0][yk==0], XK[:, 1][yk==0], \"bs\")\n", - "plt.plot(XK[:, 0][yk==1], XK[:, 1][yk==1], \"g^\")\n", - "plt.xlabel(r\"$x_2$\", fontsize=20)\n", - "plt.ylabel(r\"$x_3$ \", fontsize=20, rotation=0)\n", - "plt.annotate(r'$\\phi\\left(\\mathbf{x}\\right)$',\n", - " xy=(XK[3, 0], XK[3, 1]),\n", - " xytext=(0.65, 0.50),\n", - " ha=\"center\",\n", - " arrowprops=dict(facecolor='black', shrink=0.1),\n", - " fontsize=18,\n", - " )\n", - "plt.plot([-0.1, 1.1], [0.57, -0.1], \"r--\", linewidth=3)\n", - "plt.axis([-0.1, 1.1, -0.1, 1.1])\n", - " \n", - "plt.subplots_adjust(right=1)\n", - "\n", - "plt.show()\n", - "\n", - "\n", - "x1_example = X1D[3, 0]\n", - "for landmark in (-2, 1):\n", - " k = gaussian_rbf(np.array([[x1_example]]), np.array([[landmark]]), gamma)\n", - " print(\"Phi({}, {}) = {}\".format(x1_example, landmark, k))\n", - "\n", - "rbf_kernel_svm_clf = Pipeline([\n", - " (\"scaler\", StandardScaler()),\n", - " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=5, C=0.001))\n", - " ])\n", - "rbf_kernel_svm_clf.fit(X, y)\n", - "\n", - "\n", - "from sklearn.svm import SVC\n", - "\n", - "gamma1, gamma2 = 0.1, 5\n", - "C1, C2 = 0.001, 1000\n", - "hyperparams = (gamma1, C1), (gamma1, C2), (gamma2, C1), (gamma2, C2)\n", - "\n", - "svm_clfs = []\n", - "for gamma, C in hyperparams:\n", - " rbf_kernel_svm_clf = Pipeline([\n", - " (\"scaler\", StandardScaler()),\n", - " (\"svm_clf\", SVC(kernel=\"rbf\", gamma=gamma, C=C))\n", - " ])\n", - " rbf_kernel_svm_clf.fit(X, y)\n", - " svm_clfs.append(rbf_kernel_svm_clf)\n", - "\n", - "plt.figure(figsize=(11, 7))\n", - "\n", - "for i, svm_clf in enumerate(svm_clfs):\n", - " plt.subplot(221 + i)\n", - " plot_predictions(svm_clf, [-1.5, 2.5, -1, 1.5])\n", - " plot_dataset(X, y, [-1.5, 2.5, -1, 1.5])\n", - " gamma, C = hyperparams[i]\n", - " plt.title(r\"$\\gamma = {}, C = {}$\".format(gamma, C), fontsize=16)\n", - "\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Mathematical optimization of convex functions\n", - "\n", - "A mathematical (quadratic) optimization problem, or just optimization problem, has the form" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\begin{align*}\n", - " &\\mathrm{min}_{\\lambda}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{\\lambda}^T\\boldsymbol{P}\\boldsymbol{\\lambda}+\\boldsymbol{q}^T\\boldsymbol{\\lambda},\\\\ \\nonumber\n", - " &\\mathrm{subject\\hspace{0.1cm}to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{\\lambda} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{\\lambda}=f.\n", - "\\end{align*}\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "subject to some constraints for say a selected set $i=1,2,\\dots, n$.\n", - "In our case we are optimizing with respect to the Lagrangian multipliers $\\lambda_i$, and the\n", - "vector $\\boldsymbol{\\lambda}=[\\lambda_1, \\lambda_2,\\dots, \\lambda_n]$ is the optimization variable we are dealing with.\n", - "\n", - "In our case we are particularly interested in a class of optimization problems called convex optmization problems. \n", - "In our discussion on gradient descent methods we discussed at length the definition of a convex function. \n", - "\n", - "Convex optimization problems play a central role in applied mathematics and we recommend strongly [Boyd and Vandenberghe's text on the topics](http://web.stanford.edu/~boyd/cvxbook/).\n", - "\n", - "\n", - "\n", - "## How do we solve these problems?\n", - "\n", - "If we use Python as programming language and wish to venture beyond\n", - "**scikit-learn**, **tensorflow** and similar software which makes our\n", - "lives so much easier, we need to dive into the wonderful world of\n", - "quadratic programming. We can, if we wish, solve the minimization\n", - "problem using say standard gradient methods or conjugate gradient\n", - "methods. However, these methods tend to exhibit a rather slow\n", - "converge. So, welcome to the promised land of quadratic programming.\n", - "\n", - "The functions we need are contained in the quadratic programming package **CVXOPT** and we need to import it together with **numpy** as" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy\n", - "import cvxopt" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This will make our life much easier. You don't need t write your own optimizer.\n", - "\n", - "\n", - "## A simple example\n", - "\n", - "We remind ourselves about the general problem we want to solve" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\begin{align*}\n", - " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}\\boldsymbol{x}^T\\boldsymbol{P}\\boldsymbol{x}+\\boldsymbol{q}^T\\boldsymbol{x},\\\\ \\nonumber\n", - " &\\mathrm{subject\\hspace{0.1cm} to} \\hspace{0.2cm} \\boldsymbol{G}\\boldsymbol{x} \\preceq \\boldsymbol{h} \\wedge \\boldsymbol{A}\\boldsymbol{x}=f.\n", - "\\end{align*}\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let us show how to perform the optmization using a simple case. Assume we want to optimize the following problem" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\begin{align*}\n", - " &\\mathrm{min}_{x}\\hspace{0.2cm} \\frac{1}{2}x^2+5x+3y \\\\ \\nonumber\n", - " &\\mathrm{subject to} \\\\ \\nonumber\n", - " &x, y \\geq 0 \\\\ \\nonumber\n", - " &x+3y \\geq 15 \\\\ \\nonumber\n", - " &2x+5y \\leq 100 \\\\ \\nonumber\n", - " &3x+4y \\leq 80. \\\\ \\nonumber\n", - "\\end{align*}\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The minimization problem can be rewritten in terms of vectors and matrices as (with $x$ and $y$ being the unknowns)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\frac{1}{2}\\begin{bmatrix} x\\\\ y \\end{bmatrix}^T \\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix} \\begin{bmatrix} x \\\\ y \\end{bmatrix} + \\begin{bmatrix}3\\\\ 4 \\end{bmatrix}^T \\begin{bmatrix}x \\\\ y \\end{bmatrix}.\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Similarly, we can now set up the inequalities (we need to change $\\geq$ to $\\leq$ by multiplying with $-1$ on bot sides) as the following matrix-vector equation" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\begin{bmatrix} -1 & 0 \\\\ 0 & -1 \\\\ -1 & -3 \\\\ 2 & 5 \\\\ 3 & 4\\end{bmatrix}\\begin{bmatrix} x \\\\ y\\end{bmatrix} \\preceq \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We have collapsed all the inequalities into a single matrix $\\boldsymbol{G}$. We see also that our matrix" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\boldsymbol{P} =\\begin{bmatrix} 1 & 0\\\\ 0 & 0 \\end{bmatrix}\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "is clearly positive semi-definite (all eigenvalues larger or equal zero). \n", - "Finally, the vector $\\boldsymbol{h}$ is defined as" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\boldsymbol{h} = \\begin{bmatrix}0 \\\\ 0\\\\ -15 \\\\ 100 \\\\ 80\\end{bmatrix}.\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Since we don't have any equalities the matrix $\\boldsymbol{A}$ is set to zero\n", - "The following code solves the equations for us" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "# Import the necessary packages\n", - "import numpy\n", - "from cvxopt import matrix\n", - "from cvxopt import solvers\n", - "P = matrix(numpy.diag([1,0]), tc=’d’)\n", - "q = matrix(numpy.array([3,4]), tc=’d’)\n", - "G = matrix(numpy.array([[-1,0],[0,-1],[-1,-3],[2,5],[3,4]]), tc=’d’)\n", - "h = matrix(numpy.array([0,0,-15,100,80]), tc=’d’)\n", - "# Construct the QP, invoke solver\n", - "sol = solvers.qp(P,q,G,h)\n", - "# Extract optimal value and solution\n", - "sol[’x’] \n", - "sol[’primal objective’]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Back to the more realistic cases\n", - "\n", - "We are now ready to return to our setup of the optmization problem for a more realistic case. Introducing the **slack** parameter $C$ we have" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "$$\n", - "\\frac{1}{2} \\boldsymbol{\\lambda}^T\\begin{bmatrix} y_1y_1K(\\boldsymbol{x}_1,\\boldsymbol{x}_1) & y_1y_2K(\\boldsymbol{x}_1,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_1,\\boldsymbol{x}_n) \\\\\n", - "y_2y_1K(\\boldsymbol{x}_2,\\boldsymbol{x}_1) & y_2y_2K(\\boldsymbol{x}_2,\\boldsymbol{x}_2) & \\dots & \\dots & y_1y_nK(\\boldsymbol{x}_2,\\boldsymbol{x}_n) \\\\\n", - "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", - "\\dots & \\dots & \\dots & \\dots & \\dots \\\\\n", - "y_ny_1K(\\boldsymbol{x}_n,\\boldsymbol{x}_1) & y_ny_2K(\\boldsymbol{x}_n\\boldsymbol{x}_2) & \\dots & \\dots & y_ny_nK(\\boldsymbol{x}_n,\\boldsymbol{x}_n) \\\\\n", - "\\end{bmatrix}\\boldsymbol{\\lambda}-\\mathbb{I}\\boldsymbol{\\lambda},\n", - "$$" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "subject to $\\boldsymbol{y}^T\\boldsymbol{\\lambda}=0$. Here we defined the vectors $\\boldsymbol{\\lambda} =[\\lambda_1,\\lambda_2,\\dots,\\lambda_n]$ and \n", - "$\\boldsymbol{y}=[y_1,y_2,\\dots,y_n]$. \n", - "With the slack constants this leads to the additional constraint $0\\leq \\lambda_i \\leq C$." - ] -======= ->>>>>>> 9b0e2e75096cc1acee65bfac25f4eff818140252 } ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.8" - } - }, + "metadata": {}, "nbformat": 4, "nbformat_minor": 4 } diff --git a/doc/src/week47/week47.do.txt b/doc/src/week47/week47.do.txt index 980ad0b62..da515f66b 100644 --- a/doc/src/week47/week47.do.txt +++ b/doc/src/week47/week47.do.txt @@ -235,7 +235,7 @@ that could be chosen. Our objective is to find a plane that has the maximum margin, i.e the maximum distance between data points of both classes. Maximizing the margin distance provides some reinforcement so that future data points can be classified with -more confidence. +more confidence. Figure 12.1 of Hastie et al is a good illustration. What a linear classifier attempts to accomplish is to split the feature space into two half spaces by placing a hyperplane between the @@ -253,13 +253,13 @@ for our data sample. Let us define the function !bt \[ -f(x) = \bm{w}^T\bm{x}+b = 0, +f(x) = \bm{x}^T\bm{w}+b = 0, \] !et -as the function that determines the line $L$ that separates two classes (our two features), see the figure here. +as the function that determines the line $L$ that separates two classes (our two features), see Figure 12.1 of "Hastie et al":"https://www.springer.com/gp/book/9780387848570". -Any point defined by $\bm{x}_i$ and $\bm{x}_2$ on the line $L$ will satisfy $\bm{w}^T(\bm{x}_1-\bm{x}_2)=0$. +Any point defined by $\bm{x}_i$ and $\bm{x}_2$ on the line $L$ will satisfy $\bm{x}^T(\bm{w}_1-\bm{x}_2)=0$. The signed distance $\delta$ from any point defined by a vector $\bm{x}$ and a point $\bm{x}_0$ on the line $L$ is then !bt @@ -277,7 +277,7 @@ misclassified points $M$ and attempt to minimize this function !bt \[ -C(\bm{w},b) = -\sum_{i\in M} y_i(\bm{w}^T\bm{x}_i+b). +C(\bm{w},b) = -\sum_{i\in M} y_i(\bm{x}^T\bm{w}_i+b). \] !et @@ -344,7 +344,7 @@ $\vert\vert \bm{w}\vert\vert =1$ subject to the condition !bt \[ -y_i(\bm{w}^T\bm{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. +y_i(\bm{x}^T\bm{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, p. \] !et All points are thus at a signed distance from the decision boundary defined by the line $L$. The parameters $b$ and $w_1$ and $w_2$ define this line. @@ -352,13 +352,13 @@ All points are thus at a signed distance from the decision boundary defined by t We seek thus the largest value $M$ defined by !bt \[ -\frac{1}{\vert \vert \bm{w}\vert\vert}y_i(\bm{w}^T\bm{x}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, +\frac{1}{\vert \vert \bm{w}\vert\vert}y_i(\bm{x}^T\bm{w}_i+b) \geq M \hspace{0.1cm}\forall i=1,2,\dots, n, \] !et or just !bt \[ -y_i(\bm{w}^T\bm{x}_i+b) \geq M\vert \vert \bm{w}\vert\vert \hspace{0.1cm}\forall i. +y_i(\bm{x}^T\bm{w}_i+b) \geq M\vert \vert \bm{w}\vert\vert \hspace{0.1cm}\forall i. \] !et If we scale the equation so that $\vert \vert \bm{w}\vert\vert = 1/M$, we have to find the minimum of @@ -369,10 +369,10 @@ y_i(\bm{w}^T\bm{x}_i+b) \geq 1 \hspace{0.1cm}\forall i. \] !et -We have thus defined our margin as the invers of the norm of +We have thus defined our margin as the inverse of the norm of $\bm{w}$. We want to minimize the norm in order to have a as large as possible margin $M$. Before we proceed, we need to remind ourselves -about Lagrangian multipliers. +about Lagrangian multipliers and optimzation problems. !split ===== A quick Reminder on Lagrangian Multipliers ===== @@ -505,12 +505,14 @@ subject to the constraints $\lambda_i\geq 0$ and $\sum_i\lambda_iy_i=0$. We must in addition satisfy the "Karush-Kuhn-Tucker":"https://en.wikipedia.org/wiki/Karush%E2%80%93Kuhn%E2%80%93Tucker_conditions" (KKT) condition !bt \[ -\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b) -1\right] \hspace{0.1cm}\forall i. +\lambda_i\left[y_i(\bm{x}^T\bm{w}_i+b) -1\right] \hspace{0.1cm}\forall i. \] !et -o If $\lambda_i > 0$, then $y_i(\bm{w}^T\bm{x}_i+b)=1$ and we say that $x_i$ is on the boundary. -o If $y_i(\bm{w}^T\bm{x}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\lambda_i=0$. -When $\lambda_i > 0$, the vectors $\bm{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$. +o If $\lambda_i > 0$, then $y_i(\bm{x}^T\bm{w}_i+b)=1$ and we say that $x_i$ is on the boundary. +o If $y_i(\bm{x}^T\bm{w}_i+b)> 1$, we say $x_i$ is not on the boundary and we set $\lambda_i=0$. +When $\lambda_i > 0$, the vectors $\bm{x}_i$ are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin $M$. + +The support vectors (the points that define the margin $M$) are the quantities we keep in order to make predictions. !split ===== The problem to solve ===== @@ -549,13 +551,13 @@ To find the coefficients of your hyperplane we need simply to compute With our vector $\bm{w}$ we can in turn find the value of the intercept $b$ (here in two dimensions) via !bt \[ -y_i(\bm{w}^T\bm{x}_i+b)=1, +y_i(\bm{x}^T\bm{w}_i+b)=1, \] !et resulting in !bt \[ -b = \frac{1}{y_i}-\bm{w}^T\bm{x}_i, +b = \frac{1}{y_i}-\bm{x}_1^T\bm{w}, \] !et or if we write it out in terms of the support vectors only, with $N_s$ being their number, we have @@ -567,7 +569,7 @@ b = \frac{1}{N_s}\sum_{j\in N_s}\left(y_j-\sum_{i=1}^n\lambda_iy_i\bm{x}_i^T\bm{ With our hyperplane coefficients we can use our classifier to assign any observation by simply using !bt \[ -y_i = \mathrm{sign}(\bm{w}^T\bm{x}_i+b). +y_i = \mathrm{sign}(\bm{x}_i^T\bm{w}+b). \] !et Below we discuss how to find the optimal values of $\lambda_i$. Before we proceed however, we discuss now the so-called soft classifier. @@ -577,8 +579,10 @@ Below we discuss how to find the optimal values of $\lambda_i$. Before we procee Till now, the margin is strictly defined by the support vectors. This defines what is called a hard classifier, that is the margins are well defined. -Suppose now that classes overlap in feature space, as shown in the -figure here. One way to deal with this problem before we define the +Suppose now that the two classes overlap in feature space, as shown in Figure 12.1 of +"Hastie et al":"https://www.springer.com/gp/book/9780387848570". + +One way to deal with this problem before we define the so-called _kernel approach_, is to allow a kind of slack in the sense that we allow some points to be on the wrong side of the margin. @@ -586,18 +590,18 @@ We introduce thus the so-called _slack_ variables $\bm{\xi} =[\xi_1,x_2,\dots,x_ modify our previous equation !bt \[ -y_i(\bm{w}^T\bm{x}_i+b)=1, +y_i(\bm{x}_i^T\bm{w}+b)=1, \] !et to !bt \[ -y_i(\bm{w}^T\bm{x}_i+b)=1-\xi_i, +y_i(\bm{x}_1^T\bm{w}+b)=1-\xi_i, \] !et with the requirement $\xi_i\geq 0$. The total violation is now $\sum_i\xi$. The value $\xi_i$ in the constraint the last constraint corresponds to the amount by which the prediction -$y_i(\bm{w}^T\bm{x}_i+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\sum_i \xi_i$, +$y_i(\bm{x}_i^T\bm{w}+b)=1$ is on the wrong side of its margin. Hence by bounding the sum $\sum_i \xi_i$, we bound the total amount by which predictions fall on the wrong side of their margins. Misclassifications occur when $\xi_i > 1$. Thus bounding the total sum by some value $C$ bounds in turn the total number of @@ -616,7 +620,7 @@ This has in turn the consequences that we change our optmization problem to find subject to !bt \[ -y_i(\bm{w}^T\bm{x}_i+b)=1-\xi_i \hspace{0.1cm}\forall i, +y_i(\bm{x}_1^T\bm{w}+b)=1-\xi_i \hspace{0.1cm}\forall i, \] !et with the requirement $\xi_i\geq 0$. @@ -649,7 +653,7 @@ but now subject to the constraints $\lambda_i\geq 0$, $\sum_i\lambda_iy_i=0$ and We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads !bt \[ -\lambda_i\left[y_i(\bm{w}^T\bm{x}_i+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, +\lambda_i\left[y_i(\bm{x}_1^T\bm{w}+b) -(1-\xi_)\right]=0 \hspace{0.1cm}\forall i, \] !et !bt @@ -660,7 +664,7 @@ We must in addition satisfy the Karush-Kuhn-Tucker condition which now reads and !bt \[ -y_i(\bm{w}^T\bm{x}_i+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. +y_i(\bm{x}_i^T\bm{w}+b) -(1-\xi_) \geq 0 \hspace{0.1cm}\forall i. \] !et