Anda di halaman 1dari 22

SUPPORT VECTOR

MACHINE FOR
LINEAR SEPARABLE
CASE STUDY
AHMAD ZAKKY HIDAYATULLAH
(110411100064)
FAISAL HARIYADI (110411100067)
MOH. AGFARIZY P. (110411100007)

LINEAR SEPARABLE CASE


STUDY
DATA 1
{(1,2),(4,2),(2,4),(4,5),(3,2),(2,7),
(3,8),(1,9)}

DATA -1
{(3,-2),(2,-2),(3,-3),(2,-4),(1,-5),(4,6),}

GRAPHICS PLOT
10
8
6
4
2
0
0.5

1.5

2.5

-2
-4
-6
-8
1

-1

3.5

4.5

GRAPHIC OF SUPPORT
VECTORS
10
8
6
4
2
0
0.5

1.5

2.5

-2
-4
-6
-8
1

-1

SVs

3.5

4.5

5 SUPPORT VECTORS

S1 = (1,2) = 1
S2 = (2,-2) = -1
S3 = (3,-2) = -1
S4 = (3,2) = 1
S5 = (4,2) =1

SUPPORT VECTOR MODELS


1 * s1 s1 2 * s2 s1 3 * s3 s1 4 * s4 s1 5 * s5 s1 1
1 * s1 s2 2 * s2 s2 3 * s3 s2 4 * s4 s2 5 * s5 s2 1
1 * s1 s3 2 * s2 s3 3 * s3 s3 4 * s4 s3 5 * s5 s3 1
1 * s1 s4 2 * s2 s4 3 * s3 s4 4 * s4 s4 5 * s5 s4 1
1 * s1 s5 2 * s2 s5 3 * s3 s5 4 * s4 s5 5 * s5 s5 1

SUPPORT VECTOR EQUATIONS


1 * ~s1 ~s1 2 * ~s2 ~s1 3 * ~s3 ~s1 4 * ~s4 ~s1 5 * ~s5 ~s1 1
1 * ~s1 ~s2 2 * ~s2 ~s2 3 * ~s3 ~s2 4 * ~s4 ~s2 5 * ~s5 ~s2 1
1 * ~s1 ~s3 2 * ~s2 ~s3 3 * ~s3 ~s3 4 * ~s4 ~s3 5 * ~s5 ~s3 1
1 * ~s1 ~s4 2 * ~s2 ~s4 3 * ~s3 ~s4 4 * ~s4 ~s4 5 * ~s5 ~s4 1
1 * ~s1 ~s5 2 * ~s2 ~s5 3 * ~s3 ~s5 4 * ~s4 ~s5 5 * ~s5 ~s5 1

TRANSFORMATION
a
si
b
a

~
si b
1

~
s1 2
1

~
s2 2
1

~
s4 2
1

~
s5 2
1

~
s3 2
1

THE 1ST EQUATION


1 1
2 1
3 1
3 1








1 * 2 2 2 * 2 2 3 * 2 2 4 * 2 2 5 *
1 1
1 1
1 1
1 1








1 * 1 4 1 2 * 2 4 1 3 * 3 4 1 4 * 3 4 1 5 * 4 4 1 1

1

2
1

61 (1) 2 1 3 8 4 9 5 1

THE 2ND EQUATION


1 2
2 2
3 2
3 2

1 * 2 2 2 * 2 2 3 * 2 2 4 * 2 2 5 *
1 1
1 1
1 1
1 1

1 * 2 4 1 2 * 4 4 1 3 * 6 4 1 4 * 6 4 1 5 * 8 4 1 1
(1)1 9 2 11 3 3 4 5 5 1

4 2

2 2 1
1 1

THE 3RD EQUATION


1 3
2 3
3 3
3 3

1 * 2 2 2 * 2 2 3 * 2 2 4 * 2 2 5 *
1 1
1 1
1 1
1 1

1 * 3 4 1 2 * 6 4 1 3 * 9 4 1 4 * 9 4 1 5 * 12 4 1 1

2
1 1

4

2

11 11 2 14 3 6 4 9 5 1

THE 4RD EQUATION


1 3
2 3
3 3
3 3
4 3



1 * 2 2 2 * 2 2 3 * 2 2 4 * 2 2 5 * 2 2 1
1 1
1 1
1 1
1 1
1 1




1 * 3 4 1 2 * 6 4 1 3 * 9 4 1 4 * 9 4 1 5 * 12 4 1 1
81 3 2 6 3 14 4 17 5 1

THE 5RD EQUATION


1

1 * 2
1

2 4
3 4
3 4
4






2 * 2 2 3 * 2 2 4 * 2 2 5 * 2

1 1
1 1
1 1
1


1 * 4 4 1 2 * 8 4 1 3 * 12 4 1 4 * 12 4 1 5 * 16 4 1 1
4

2
1

91 5 2 9 3 17 4 21 5 1

4

2 1
1

5 EQUATIONS

61 (1) 2 3 8 4 9 5 1
(1)1 9 2 11 3 3 4 5 5 1

1 11 2 14 3 6 4 9 5 1
81 3 2 6 3 14 4 17 5 1
91 5 2 9 3 17 4 21 5 1

RESULTS

2

3

4
5

0,125

0,25
0,125

FIND W AND B
~ * ~s
w
i i
i

1 * ~s1 2 * ~s2 3 * ~s3 4 * ~s4 5 * ~s5


1
2
3
3
4



0 * 2 (0.125) * 2 0 * 2 0.25 * 2 (0.125) * 2
1
1
1
1
1

0.5
0

FINAL RESULT
0
w

0.5
y w x b
0
x

0.5

b0

CLASS DETERMINATION

1 if
Class
1 if

y( x) 0
y( x) 0

HYPERPLANE
10
8
6
4
2
0

-2
-4
-6
-8
1

-1

SVs

hyperland

TEST

3
x1
4
1
x3
3

4
x2
1
2
x4
6

RESULT FOR X1
y w x1

0
x1

0.5
0 3


0.5 4
0 2
2

y ( x1 ) 2
y ( x1 ) 0
Class 1

RESULT FOR X2
y w x1

0
x1

0.5
0 4


0.5 1
0 0.5
0,5

y ( x1 ) 0.5
y ( x1 ) 0

Class 1

RESULT FOR X3
y w x1

0
x1

0.5
0 1


0.5 3
0 1.5
1,5

y ( x1 ) 1.5
y ( x1 ) 0

Class 1

RESULT FOR X4
y w x1

0
x1

0.5
0 2


0.5 6
0 3
3

y ( x1 ) 3
y ( x1 ) 0
Class 1