Question: 2 Linear Example w 2 Linear Example when Phi is trivial Suppose we are given the following positively labeled data points in < 2

2 Linear Example w2 Linear Example when \Phi is trivial
Suppose we are given the following positively labeled data points in <
2
:
3
1
,
3
1
,
6
1
,
6
1
and the following negatively labeled data points in <
2
(see Figure 1):
1
0
,
0
1
,
0
1
,
1
0
1
Figure 1: Sample data points in <
2
. Blue diamonds are positive examples and
red squares are negative examples.
We would like to discover a simple SVM that accurately discriminates the
two classes. Since the data is linearly separable, we can use a linear SVM (that
is, one whose mapping function \Phi () is the identity function). By inspection, it
should be obvious that there are three support vectors (see Figure 2):
s1=
1
0
, s2=
3
1
, s3=
3
1
In what follows we will use vectors augmented with a 1 as a bias input, and
for clarity we will differentiate these with an over-tilde. So, if s1=(10), then
s1=(101). Figure 3 shows the SVM architecture, and our task is to find values
for the \alpha i such that
\alpha 1\Phi (s1)\Phi (s1)+\alpha 2\Phi (s2)\Phi (s1)+\alpha 3\Phi (s3)\Phi (s1)=1
\alpha 1\Phi (s1)\Phi (s2)+\alpha 2\Phi (s2)\Phi (s2)+\alpha 3\Phi (s3)\Phi (s2)=+1
\alpha 1\Phi (s1)\Phi (s3)+\alpha 2\Phi (s2)\Phi (s3)+\alpha 3\Phi (s3)\Phi (s3)=+1
Since for now we have let \Phi ()= I, this reduces to
\alpha 1s1 s1+\alpha 2s2 s1+\alpha 3s3 s1=1
\alpha 1s1 s2+\alpha 2s2 s2+\alpha 3s3 s2=+1
\alpha 1s1 s3+\alpha 2s2 s3+\alpha 3s3 s3=+1
Now, computing the dot products results in
2
Figure 2: The three support vectors are marked as yellow circles.
Figure 3: The SVM architecture.
3
2\alpha 1+4\alpha 2+4\alpha 3=1
4\alpha 1+11\alpha 2+9\alpha 3=+1
4\alpha 1+9\alpha 2+11\alpha 3=+1
A little algebra reveals that the solution to this system of equations is \alpha 1=
3.5,\alpha 2=0.75 and \alpha 3=0.75.
Now, we can look at how these \alpha values relate to the discriminating hyperplane; or, in other words, now that we have the \alpha i
, how do we find the hyperplane that discriminates the positive from the negative examples? It turns out
that
w=
X
i
\alpha isi
=3.5
1
0
1
+0.75
3
1
1
+0.75
3
1
1
=
1
0
2
Finally, remembering that our vectors are augmented with a bias, we can
equate the last entry in w as the hyperplane offset b and write the separating
hyperplane equation y = wx+b with w =
1
0
and b =2. Plotting the line
gives the expected decision surface (see Figure 4).hen \Phi is trivial
Suppose we are given the following positively labeled data points in <
2
:
3
1
,
3
1
,
6
1
,
6
1
and the following negatively labeled data points in <
2
(see Figure 1):
1
0
,
0
1
,
0
1
,
1
0
1
Figure 1: Sample data points in <
2
. Blue diamonds are positive examples and
red squares are negative examples.
We would like to discover a simple SVM that accurately discriminates the
two classes. Since the data is linearly separable, we can use a linear SVM (that
is, one whose mapping function \Phi () is the identity function). By inspection, it
should be obvious that there are three support vectors (see Figure 2):
s1=
1
0
, s2=
3
1
, s3=
3
1
In what follows we will use vectors augmented with a 1 as a bias input, and
for clarity we will differentiate these with an over-tilde. So, if s1=(10), then
s1=(101). Figure 3 shows the SVM architecture, and our task is to find values
for the \alpha i such that
\alpha 1\Phi (s1)\Phi (s1)+\alpha 2\Phi (s2)\Phi (s1)+\alpha 3\Phi (s3)\Phi (s1)=1
\alpha 1\Phi (s1)\Phi (s2)+\alpha 2\Phi (s2)\Phi (s2)+\alpha 3\Phi (s3)\Phi (s2)=+1
\alpha 1\Phi (s1)\Phi (s3)+\alpha 2\Phi (s2)\Phi (s3)+\alpha 3\Phi (s3)\Phi (s3)=+1
Since for now we have let \Phi ()= I, this reduces to
\alpha 1s1 s1+\alpha 2s2 s1+\alpha 3s3 s1=1
\alpha 1s1 s2+\alpha 2s2 s2+\alpha 3s3 s2=+1
\alpha 1s1 s3+\alpha 2s2 s3+\alpha 3s3 s3=+1
Now, computing the dot products results in
2
Figure 2: The three support vectors are marked as yellow circles.
Figure 3: The SVM architecture.
3
2\alpha 1+4\alpha 2+4\alpha 3=1
4\alpha 1+11\alpha 2+9\alpha 3=+1
4\alpha 1+9\alpha 2+11\alpha 3=+1
A little algebra reveals that the solution to this system of equations is \alpha 1=
3.5,\alpha 2=0.75 and \alpha 3=0.75

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!