0% found this document useful (0 votes)
2 views

Svm

The document presents an overview of Support Vector Machines (SVM), detailing their theoretical foundations, implementation approaches, and applications across various domains. It explains key concepts such as the optimal hyperplane, support vectors, and margin maximization, while also covering mathematical formulations and decision functions used in SVM. The learning objectives focus on understanding SVM principles, mathematical formulations, and practical use cases.

Uploaded by

yourworsehalf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Svm

The document presents an overview of Support Vector Machines (SVM), detailing their theoretical foundations, implementation approaches, and applications across various domains. It explains key concepts such as the optimal hyperplane, support vectors, and margin maximization, while also covering mathematical formulations and decision functions used in SVM. The learning objectives focus on understanding SVM principles, mathematical formulations, and practical use cases.

Uploaded by

yourworsehalf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Support Vector Machines:

Theory, Implementation, and


Applications
Presented By:
Sachin 2022U IT3065

Praatham Sharma 2022UIT3068

Ishan Singh 2022UIT3072

A m j a d I m ra n 2022U IT3079

S a c h i n S i m a u l i ya 2022UIT3151

Presented to:

Ms. S h u b h r a G oya l M a m
Overview/Agenda
• I n t r o d u c ti o n to S u p p o r t Ve c t o r M a c h i n e s
• T h e o re ti c a l F o u n d a ti o n s
• L i n e a r a n d N o n - linear C l a s s i fi cati on
• Kernel Methods
• M a t h e m a ti c a l F r a m e w o r k
• I m p l e m e n t a ti o n A p p r o a c h e s
• A p p l i c a ti o n s a c r o s s d o m a i n s
• A d v a n c e d To p i c s a n d E x t e n s i o n s
• C a s e S t u d i e s a n d P ra c ti c a l C o n s i d e ra ti o n s

L e a r n i n g O b j ec ti ves : U n d e r s t a n d i n g S V M p ri nci p l es , m a t h e m a ti c a l form ul ati on, i m p l e m e n t a ti o n , a n d p ra c ti c a l u s e


cases.
Introduction to Support
Vector Machines
D e v e l o p e d b y V l a d i m i r Va p n i k a n d c o l l e a g u e s at AT & T B ell
L a b o ra t o r i e s (1992-1995). E v o l v e d f r o m S tati sti c a l L e a r n i n g Theory.
S V M is a s u p e r v i s e d m a c h i n e l e a r n i n g a l g o r i t h m t h a t fi n d s a n
o p ti m a l h y p e r p l a n e to s e p a ra t e d a t a i nto d i sti n c t c l a s s e s . F o c u s o n
m a x i m i z i n g t h e m a r g i n b e t w e e n c l a s s e s . Initi ally for b i n a r y
clas s ifi cati on, later ex te n d e d .
Fundamental Concept
At its core, t h e S u p p o r t Ve c t o r M a c h i n e (SVM) s e e k s to i d enti f y t h e
o p ti m a l h y p e r p l a n e t h a t m o s t eff e c ti ve l y s e p a ra t e s d a t a p o i nt s
i nto d i sti n c t c l a s s e s . T h i s h y p e r p l a n e is c h o s e n to m a x i m i z e t h e
m a r g i n — t h e d i s t a n c e b e t w e e n itself a n d t h e n e a r e s t d a t a p o i nt s
f r o m e a c h cl as s . I n a n n - d i m e n s i o n a l s p a c e , t h e h y p e r p l a n e is
d e fi n e d b y t h e e q u a ti o n w · x + b = 0, w h e r e w r e p r e s e n t s t h e
w e i g h t vector, x is t h e i n p u t vector, a n d b is t h e bias. Cl as s i fi cati on
is t h e n a c c o m p l i s h e d u s i n g t h e d e c i s i o n f u n c ti o n : f(x) = s i g n ( w · x +
b).
Key Terminology
S u p p o r t Vectors: Criti cal d a t a p o i n t s n e a r e s t to t h e s e p a ra ti n g hy p e r p l a n e , i n fl u e n c i n g its p o s i ti o n a n d orientati on.
Margin: T h e p e r p e n d i c u l a r d i s t a n c e b e t w e e n t h e h y p e r p l a n e a n d t h e c l o s e s t s u p p o r t vectors, i n d i c a ti n g cl assi fi cati on c o nfi d e n c e.
M a x i m u m M a rg i n H y p e r p l a n e (MMH): T h e o p ti m a l h y p e r p l a n e t h at m a x i m i z e s t h e m a r g i n , p r o v i d i n g t h e b e s t s e p a rati o n b e t w e e n classes.
D e c i s i o n B o u n d a r y : T h e hy p e r p l a n e t h at d i sti nctl y s e p a ra t e s d a t a p o i n t s of diff erent c l a s s e s , e n a b l i n g classifi cati on.

F e a t u r e S p a c e : T h e n - d i m e n s i o n a l s p a c e r e p r e s e n ti n g all p o s s i b l e v a l u e s of t h e i n p u t features, w h e r e d a t a p o i n t s are plott ed.

SVM: Maximum margin separating hyperplane


How SVM Works - Basic Principles
S u p p o r t Ve c t o r M a c h i n e s ( SV M s ) fol l ow a s t r u c t u r e d p r o c e s s to a c h i e v e o p ti m a l d a t a clas sifi cati on. H e re ' s a c o n c i s e
o v e r v i e w of t h e k e y principles:

F e a t u r e S p a c e M a p p i n g : T h e i n p u t d a t a is t ra n s f o r m e d i nto a h i g h - d i m e n s i o n a l fe at u re s p a c e , e n a b l i n g t h e
r e p r e s e n t a ti o n of c o m p l e x re l a ti o n s h i p s w i t h i n t h e data.
H y p e r p l a n e Generati on : Multi ple p o te nti a l h y p e r p l a n e s a re c r e a t e d w i t h i n t h e fe at u re s p a c e , e a c h a c ti n g a s a
c a n d i d a t e d e c i s i o n b o u n d a r y b e t w e e n cl a s s es .
M a r g i n C a l c u l ati o n : F o r e a c h hy p e r p l a n e , t h e m a r g i n — t h e d i s t a n c e b e t w e e n t h e h y p e r p l a n e a n d t h e n e a r e s t d a t a
p o i n t s ( s u p p o r t ve c to rs ) f r o m e a c h c l a s s — is c o m p u t e d .
M a x i m u m M a r g i n S el e c ti o n : T h e a l g o r i t h m s e l e c t s t h e h y p e r p l a n e w i t h t h e l a r g e s t m a r g i n , k n o w n a s t h e M a x i m u m
M a r g i n H y p e r p l a n e (MMH), e n s u r i n g o p ti m a l c l a s s separati on.
S u p p o r t Ve c t o r Identi fi cati on: C ri ti ca l d a t a p o i n t s c l o s e s t to t h e MMH, c a l l e d s u p p o r t ve c to rs , a re identi fi ed. T h e s e
p o i n t s p l ay a pi vota l role i n d e t e r m i n i n g t h e hy p e r p l a n e ' s p o s i ti o n a n d orientati on.
D e c i s i o n F u n c ti o n D erivati on: A d e c i s i o n f u n c ti o n is f o r m u l a t e d u s i n g t h e s u p p o r t v e c t o r s a n d MMH. T h i s f u n c ti o n
c l a s s i fi es n e w d a t a p o i n t s b y d e t e r m i n i n g w h i c h s i d e of t h e h y p e r p l a n e t h e y fall on.
Mathematical Representation
T h e fo u n d ati o n of a linear S u p p o r t Ve c t o r M a c h i n e lies in its p r e c i s e m a t h e m a ti c a l
formulati on, w h i c h c a n b e b r o ke n d o w n into t h e fo l l o w i n g c o m p o n e n t s :

P r i m a l Formulati on:
T h e o b j e c ti ve is to m i n i m i z e ½||w||², w h e r e w is t h e w e i g h t vector, w h i l e e n s u r i n g that
e ve r y d a t a p o i nt sati sfi es t h e c o n st ra i n t yi(w·xi + b) ≥ 1. T h i s g u a r a n t e e s n o t o n l y c o rrec t
cl assi fi cati on b u t al s o a m a r g i n of at l east 1, re s u l ti n g in a q u a d ra ti c o p ti m i zati o n p ro b l e m
t h at c a n b e s o l v e d u s i n g L a g r a n g i a n multi pliers.

L a g r a n g i a n Formulati on:
To s o l ve t h i s o p ti m i zati o n p ro b l e m , t h e L a g r a n g i a n f u n c ti o n is d e fi n e d as:
L ( w, b, α) = ½||w||² - Σi αi[yi(w·xi + b) - 1]
Here, αi r e p r e s e n t s t h e L a g r a n g i a n m ul ti p l i ers a s s o c i a t e d w i t h e a c h
constraint.

K a r u s h - K u h n - Tu c k e r ( K K T ) Conditi ons:
A p p l y i n g t h e K K T c o n d i ti o n s p ro v i d e s e s s e nti a l rel ati o n s h i ps for opti mality:
w = Σi αiyixi
Σi αiyi = 0
T h e s e e q u a ti o n s p l ay a c r u c i a l role in d e fi n i n g t h e o p ti m a l p arameters.

D e c i s i o n F u n c ti o n :
Finally, w i t h t h e o p ti m a l p a ra m e t e r s in h a n d , t h e d e c i s i o n f u n c ti o n f o r m u l a t e d for
c l a s s i f y i n g n e w d a t a p o i n t s is:
f(x) = sign(Σi αiyi(xi·x) + b)
T h i s f u n c ti o n a s s i g n s t h e c l a s s of a n e w d a t a p o i nt b a s e d o n w h i c h s i d e of t h e h y p e r p l a n e it
falls on.
Linear Separability
L i n e a r l y s e p a ra b l e d a t a c a n b e p e r fe c t l y d i v i d e d i nto d i sti n c t
c l a s s e s u s i n g a hy p e r p l a n e . T h i s d i v i s i o n r e q u i r e s s e l e c ti n g
p a ra m e t e r s w ( t h e w e i g h t ve c to r ) a n d b ( t h e b i a s ) s o t h a t for e ve r y
t ra i n i n g e x a m p l e (xi, yi), t h e c o n d i ti o n yi(w·xi + b) > 0 is m e t . T h e
c l a s s i fi c a ti o n b o u n d a r i e s a re e s t a b l i s h e d b y t h e c a n o n i c a l
h y p e r p l a n e s d e fi n e d b y w · x + b = 1 a n d w · x + b = -1, w h i c h c r e a t e a
m a r g i n of w i d t h 2/||w||. A h a r d - m a r g i n S V M s e e k s to fi n d t h e
unique hyperplane that m axi m izes this margin, ensuring the most
r o b u s t s e p a ra ti o n b e t w e e n t h e cl a s s es .
Margin Maximization
T h e g o a l of m a r g i n m a x i m i z a ti o n is to a c h i e v e t h e w i d e s t p o s s i b l e
s e p a ra ti o n b e t w e e n c l a s s e s , q u a n ti fi e d a s 2/||w||, w h i l e e n s u r i n g all
d a t a p o i n t s m e e t t h e r e q u i r e m e n t yi(w·xi + b) ≥ 1. T h i s o b j e c ti v e is
m a t h e m a ti c a l l y e q u i va l e n t to m i n i m i z i n g (||w||²)/2 u n d e r t h e s a m e
c o n st ra i nt s , f o r m i n g a c o n v e x o p ti m i z a ti o n p r o b l e m w i t h a u n i q u e
soluti on. T h i s p r o b l e m is c o m m o n l y s o l v e d u s i n g t h e L a g r a n g i a n
formulati on:

L ( w, b, α) = ½||w||² - Σi αi[yi(w·xi + b) - 1],

w h e r e t h e αi r e p r e s e n t L a g r a n g e multi pliers. T h e d u a l fo rm u l ati o n


of t h i s o p ti m i z a ti o n p r o b l e m is t h e n e x p r e s s e d as:

Maxi m i ze: Σi αi - ½ Σi Σj αiαj yi yj (xi·xj),

s u b j e c t to t h e c o n s t ra i n t s t h a t αi ≥ 0 for all i a n d Σi αiyi = 0.


Non-Linearly Separable Data
I n m a n y p ra c ti c a l s c e n a r i o s , d a t a c a n n o t b e p e r fe c t l y d i v i d e d b y a s i m p l e linear
b o u n d a r y. A c l a s s i c illustrati on of t h i s c h a l l e n g e is t h e X O R p r o b l e m , w h e r e d a t a
p o i n t s f r o m di ff e re nt c l a s s e s a re s o intricately i n t e r w o v e n t h a t n o s i n g l e st ra i g ht
line or h y p e r p l a n e c a n eff e c ti ve l y s e p a ra t e t h e m .

To a d d r e s s n o n - linearly s e p a ra b l e data, S u p p o r t Ve c t o r M a c h i n e s ( SV M s) e m p l o y
t w o m a i n a p p r o a c h e s . T h e fi rst is t h e Soft -M a r g i n SVM, w h i c h i n t r o d u c e s s l a c k
variables. T h e s e s l a c k va r i a b l e s a l l o w for s o m e m i s c l a s s i fi c a ti o n s b y a c c e p ti n g
d a t a p o i n t s t h a t fall w i t h i n t h e m a r g i n or e v e n o n t h e w r o n g s i d e of t h e
hy p e r p l a n e . T h i s a p p r o a c h ca refu l l y b a l a n c e s t h e n e e d to m a x i m i z e t h e m a r g i n
w h i l e a l s o a c c o m m o d a ti n g errors i n classifi cati on.

T h e s e c o n d a p p r o a c h uti lizes K e r n e l M et h o d s . I n s t e a d of t r y i n g to fi n d a linear


b o u n d a r y i n t h e o r i g i n a l i n p u t s p a c e , ke r n e l f u n c ti o n s t ra n s fo r m t h e d a t a i nto a
h i g h e r - d i m e n s i o n a l s p a c e w h e r e linear s e p a ra ti o n b e c o m e s feasible. Thi s
t ra n sfo r m a ti o n is p e r f o r m e d i mpl i c i t l y t h r o u g h t h e c o m p u t a ti o n of d o t p r o d u c t s
i n t h e n e w s p a c e , m a k i n g it u n n e c e s s a r y to ex pl i c i t l y c o m p u t e t h e h i g h -
d i m e n s i o n a l m a p p i n g . A s a result, t h e ke r n e l t r i c k e n a b l e s S V M s to m a n a g e
c o m p l e x , n o n - linear re l a ti o n s h i ps eff ecti vely.

To g e t h e r, t h e s e t e c h n i q u e s a l l o w S V M s to a d a p t to a w i d e r a n g e of real-wo r l d
p r o b l e m s w h e r e s i m p l e linear b o u n d a r i e s a re insuffi cient.
The Kernel Trick
T h e ke r n e l t r i c k is a m e t h o d t h a t a l l o w s u s to u s e linear m o d e l s to
s o l v e n o n - linear p r o b l e m s . It w o r k s b y i m p l i c i t l y m a p p i n g t h e
o r i g i n a l d a t a i nto a h i g h e r - d i m e n s i o n a l s p a c e w h e r e a linear
s e p a ra ti o n is pos s i bl e. T h i s is a c h i e v e d u s i n g ke r n e l f uncti ons ,
w h i c h effi ciently c o m p u t e d o t p r o d u c t s i n t h i s t ra n s f o r m e d s p a c e
w i t h o u t expl i ci tl y p e r f o r m i n g t h e t ra n sfo r m ati o n . Mercer's
t h e o r e m p r o v i d e s t h e m a t h e m a ti c a l fo u n d a ti o n , s p e c i f y i n g t h e
c o n d i ti o n s t h a t a ke r n e l f u n c ti o n m u s t s ati sf y to e n s u r e t h a t it
c o r r e s p o n d s to a va l i d d o t p r o d u c t i n s o m e h i g h - d i m e n s i o n a l
space.
Kernel Types - Overview
L i n ea r, Po l y n o m i a l , R B F (Gaus s ian), a n d S i g m o i d ke r n e l s e a c h h a v e di ff erent c h a ra c te r i sti c s . C h o o s i n g t h e
a p p ro p r i a te ke r n e l d e p e n d s o n d a t a c h a ra c t e r i s ti c s a n d d o m a i n k n o w l e d g e . T h e s e ke r n e l s off er diff erent
a p p r o a c h e s to t ra n s f o r m i n g data, e n a b l i n g S V M s to t a c k l e a va ri ety of p ro b l e m s .

Linear Kernel Polynomial Kernel

K(x,y) = x·y. T h i s ke r n e l p e r f o r m s n o explicit K(x,y) = (γx·y + r)ᵈ. T h e p o l y n o m i a l ke r n e l i n t r o d u c e s


t ra n s fo r m a ti o n a n d is m o s t eff e c ti ve w h e n t h e d a t a is p o l y n o m i a l d e c i s i o n b o u n d a r i e s b y m a p p i n g d a t a into
a l re a d y linearly s e p a ra b l e . It is c o m p u t a ti o n a l l y a h i g h e r - d i m e n s i o n a l s p a c e . It is c o nt ro l l e d b y
effi ci ent a n d s u i ta b l e for l a r g e d a t a s e t s w i t h m a n y p a ra m e t e r s s u c h a s γ ( g a m m a ) , r (coeffi cient), a n d d
features. ( d e gree ) , w h i c h i n fl u e n c e t h e fl exibility a n d c o m p l e x i t y
of t h e m o d e l .
RBF Kernel in Detail
T h e R a d i a l B a s i s F u n c ti o n ( R B F ) ke r n e l is d e fi n e d a s K(x,y) = ex p(- γ||x-
y||²), w h e r e γ > 0. It i mpl i c i tl y m a p s d a t a p o i n t s i nto a n infi nite-
d i m e n s i o n a l s p a c e , a l l o w i n g for h i g h l y fl exible, n o n - linear d e c i s i o n
b o u n d a r i e s . In pra c ti c e , m o s t libraries defa ul t t h e g a m m a (γ) p a ra m e te r
to 1 d i v i d e d b y t h e n u m b e r of fe at u re s in t h e dataset.

Geometric Interpretation
T h e R B F ke r n e l m e a s u r e s t h e similarity b e t w e e n t w o p o i nt s
b a s e d o n their E u c l i d e a n d i sta n c e . S m a l l e r d i s t a n c e s resul t in
h i g h e r similarity s co re s , i n d i c a ti n g a s t r o n g e r i n fl u e n c e o n t he
d e c i s i o n bo unda r y.

Gamma Parameter (γ)


G a m m a (γ) c o nt ro l s t h e i n fl u e n c e ra d i u s of e a c h s u p p o r t vector. A
s m a l l e r g a m m a va l u e re s ul t s in a w i d e r i nfl uenc e, l e a d i n g to a
s m o o t h e r d e c i s i o n b o u n d a r y, w h e r e a s a l a rge r g a m m a va l ue
c r e a te s a m o r e c o m p l e x a n d po tenti a l l y overfi t mo de l .
Polynomial Kernel
M at h e m a ti c a l Fo r m u l ati o n : K(x,y) = (γx·y + r)ᵈ. F e a t u r e n o r m a l i zati o n is
o ft e n r e c o m m e n d e d . C a n b e m e m o r y intensive, e s p e c i a l l y for l a rge
data s et s . Eff e c ti v e for p r o b l e m s w h e r e fe at ure re l ati o ns hi ps c a n b e
e x p r e s s e d a s polyno mials.

Degree (d)
H i g h e r d e g r e e (d): E n a b l e s m o r e fl exible a n d c o m p l e x
d e c i s i o n b o u n d a r i e s b u t i n c r e a s e s t h e r i s k of overfi tti ng.

Scale (γ)
C o n t r o l s t h e i n fl u e n c e of e a c h d a t a point; a h i g h e r va l ue
c o r r e s p o n d s to a s t r o n g e r infl uence.

Coefficient (r)
A d d s a c o n s t a n t b i a s to t h e ke r n e l func ti o n, a ff e c ti n g t he
p o s i ti o n i n g of d e c i s i o n bo unda ri es.
Sigmoid Kernel
M a t h e m a ti c a l form ul ati on : K(x,y) = tanh(γx·y + r). I n s p i r e d b y n e u ra l n e t w o r k a c ti va ti o n f u n c ti o n s . General l y
u n d e r p e r f o r m s c o m p a r e d to R B F. S e n s i ti v e to fe a t u re s c a l i n g .

Scale (γ) Threshold (r)


C o n t r o l s t h e s c a l e of i n p u t data.
1 2 A ff e c t s t h e t h r e s h o l d shift .
Soft Margin Classification
T h e s oft m a r g i n a p p r o a c h p e r m i t s s o m e m i s c l a s s i fi c a ti o n s to e n h a n c e ge n e ra l i zati o n , b a l a n c i n g m a r g i n
m a x i m i z a ti o n a n d error m i n i m i z a ti o n u s i n g t h e r e g u l a r i z a ti o n p a ra m e t e r C.

Small C
1
W i d e r m a r g i n prioriti zed; m o r e errors tolerated.

Large C
2
C o r r e c t c l a s s i fi c a ti o n prioriti zed; n a r r o w e r m a r g i n .
SVM Algorithm Implementation
I m p l e m e n ti n g a n S V M a l g o r i t h m re q u i re s ca ref ul p re p a rati o n a n d
validati on. B e g i n b y s c a l i n g t h e fe at u re s of y o u r d a t a s e t to e n s u r e
o p ti m a l p e r fo r m a n c e . T h e n , d i v i d e t h e d a t a i nto d i sti n c t t ra i n i n g a n d
t e s ti n g sets. S e l e c t a n a p p ro p r i ate ke r n e l f u n c ti o n (e.g., R B F,
Po l y n o m i a l ) a n d initi alize its hy p e r p a ra m e te r s . Ev a l u a t e t h e m o d e l ' s
p e r f o r m a n c e u s i n g c r o s s - va li dati o n t e c h n i q u e s to fi ne-t u n e
hy p e r p a ra m e t e r s a n d p r e v e n t overfi tti ng.

Data Preprocessing

Model Training

Model Validation
Hyperparameter Tuning
K e y h y p e r p a ra m e t e r s to t u n e i n c l u d e C , K e r n e l type, γ, d, a n d r.
C o m m o n t u n i n g m e t h o d o l o g i e s a re G r i d S e a rc h , R a n d o m S e a rc h ,
a n d B a y e s i a n O p ti m i za ti o n . E m p l o y k- fold c r o s s - va l i d ati o n to
e n s u r e r o b u s t a n d reliable results.

Grid Search Random Search


A n e x h a u s ti v e s e a r c h th at A m o r e effi ci ent a p p r o a c h
sy s t e m a ti c a l l y ex p l o r e s all that randomly samples
s p e c i fi e d p a ra m e te r p a ra m e t e r c o m b i n a ti o n s
c o m b i n a ti o n s . f r o m d e fi n e d distributi ons.

Bayesian Optimization
A s e q u e n ti a l o p ti m i z a ti o n t e c h n i q u e t h a t u s e s a probabilisti c
m o d e l to g u i d e t h e s e a r c h for t h e b e s t hy p e r p a ra m e te rs .
Multi-Class Classification with SVM
S u p p o r t Ve c t o r M a c h i n e s a re f u n d a m e n t a l l y d e s i g n e d for b i n a r y classifi cati on. To t a c k l e m ulti - c l a s s p ro b l e m s , t w o c o m m o n s t ra t e g i e s a re e m p l o y e d : O n e - v s - R e s t (O v R ) a n d O n e - v s - O n e (OvO).

OvR (One-vs-Rest)
I n t h e O v R a p p ro a c h , w e t rain 'k' s e p a ra t e b i n a r y S V M classifi ers, w h e r e 'k' is t h e n u m b e r of c lasse s. E a c h classifi er is t ra i n e d to d i s ti n g u i s h o n e s p e c i fi c c la ss
a ga i n s t all t h e r e m a i n i n g classes.

1 2

OvO (One-vs-One)
T h e O v O s t r a t e g y i nvo l v e s t ra i n i n g a b i n a r y S V M classifi er for e v e r y p o s s i b l e pair of c la sse s. T h i s re sult s in a total of k ( k- 1)/2 classifi e rs b e i n g trained, off e rin g a
m o r e g r a n u l a r a p p r o a c h to m ulti - c l a s s discriminati on.
Support Vector Regression
(SVR) Explained
S V R a p p l i e s S V M p r i n c i p l e s to re g re s s i o n . It a i m s to fi n d a f u n c ti o n that
a p p r o x i m a t e s t h e t a r g e t va ri a bl e w i t h i n a m a r g i n of to l e ra n c e (ε). K e y
p a r a m e t e r s i n fl u e n c i n g t h i s a re t h e to l e ra n c e (ε) a n d t h e re gul a ri zati on
p a r a m e t e r (C).

ε
Insensitive Tube (ε)
D e fi n e s t h e w i d t h of t h e i n s e n s i ti ve tube.

C
Regularization (C)
C o n t ro l s t h e re g u l a r i zati o n st re n gt h .
Applications of Support Vector Machines
T h i s p re s e n t ati o n h i g h l i g h t s t h e w i d e - r a n g i n g a p p l i cati o n s of S u p p o r t Ve c t o r M a c h i n e s (SVMs). W e will d e l v e into s eve ra l ke y
a re a s w h e r e S V M s d e m o n s t r a t e s t r o n g p e r fo r m a n c e , s u c h a s i m a g e analysi s, m e d i c a l d i a g n o s i s , a n d f ra u d detecti on.
F u r t h e r m o re , w e will e x a m i n e t h e benefi ts, limitati ons, a n d p ra c ti c a l a s p e c t s of d e p l o y i n g S V M s eff ecti vely.
Application in Image Analysis
C o n s i d e r a c a s e s t u d y i n f a c e d ete c ti o n : A s l i d i n g w i n d o w a p p ro a c h ,
c o m b i n e d w i t h a n S V M classifi er, s c a n s i m a g e s . F e a t u r e p y ra m i d s
e n a b l e d e t e c ti o n at m u l ti p l e s ca l e s . To refi n e results, n o n - m a x i m u m
s u p p r e s s i o n e l i m i n a te s o v e r l a p p i n g d ete c ti o n s , e n s u r i n g o n l y t h e
m o s t a c c u r a t e f a c e d e t e c ti o n s a re retained.

S u p p o r t Ve c t o r M a c h i n e s a re w i d e l y u s e d i n i m a g e classifi cati on.


K e y s t e p s i n c l u d e e x t ra c ti n g fe a t u re s u s i n g m e t h o d s l i ke H O G , SIFT,
L B P, or d e e p fe a t u re s f r o m C N N s . D i m e n s i o n a l i t y re d u c ti o n , o ft e n
a c h i e v e d w i t h P C A or t-S N E , o p ti m i ze s p e r fo r m a n c e . I m a g e
cl a s s i fi cati on m o d e l s a re e v a l u a t e d u s i n g s p e c i fi c m e t r i c s to e n s u r e
a c c u ra c y.
Heart Disease Prediction
with SVMs
S u p p o r t Ve c t o r M a c h i n e s a re eff e c ti ve i n p r e d i c ti n g h e a r t di s ea s e,
a c h i e v i n g h i g h p e r f o r m a n c e o n b e n c h m a r k d a t a s e t s l i ke t h e
C l e v e l a n d H e a r t D i s e a s e d ata s et . K e y p r e d i c ti v e fe a t u re s i n c l u d e
p a ti e n t a g e , g e n d e r, c h e s t p a i n c h a ra c te r i sti c s , b l o o d p re s s u re , a n d
c h o l e ste ro l levels. S V M m o d e l s p r o v i d e a c c u r a t e d i a g n o s e s , a s
i n d i c a t e d b y t h e f o l l o w i n g p e r f o r m a n c e m etri cs :

Accuracy 84-86%

S ens i ti vi ty 80-85%

S p e c i fi ci t y 8 5 -8 8 %

A U C- R O C 0 . 8 8 - 0.91
Application in Credit Card Fraud Detection

S u p p o r t Ve c t o r M a c h i n e s a re h i g h l y eff e c ti ve i n c r e d i t c a r d f ra u d d e te c ti o n . D u e to t h e i m b a l a n c e d n a t u r e of t h e s e
d a ta s e t s , w h e r e f ra u d u l e n t t ra n s a c ti o n s a re s i g n i fi c a n t l y fe w e r t h a n l e g i ti m a te o n e s , a d v a n c e d s a m p l i n g
t e c h n i q u e s s u c h a s S M O T E ( S y n t h e ti c Minority O v e r- s a m p l i n g Te c h n i q u e ) a re o ft e n e m p l o y e d to b a l a n c e t h e c l a s s
distributi on. F e a t u r e e n g i n e e r i n g p l a y s a c r u c i a l role, w i t h ti m e - b a s e d fe a t u re s l i ke t ra n s a c ti o n f r e q u e n c y, r e c e n c y,
a n d ti m e of d a y b e i n g p a r ti c u l a r l y u s e f u l i n d i s ti n g u i s h i n g f ra u d u l e n t acti viti es.
Key Advantages of SVM
S V M s a re m e m o r y effi cient b e c a u s e t h e d e c i s i o n f u n c ti o n
relies so lely o n s u p p o r t vec to rs. T h e y a l so off er versati lity
t h r o u g h ke r n e l f unc ti o ns , w h i c h c a n b e c u s t o m i z e d to
a d d r e s s s p e c i fi c d o m a i n r e q u i r e m e n t s a n d i m p r o v e
a c c u ra c y.

S V M s e xc e l in h i g h - d i m e n s i o n a l s p a c e s , eff ecti vely


m i ti g a ti n g t h e c u r s e of di me ns i o na l i t y. Their p e r fo r m a n c e
r e m a i n s r o b u s t e v e n a s t h e n u m b e r of d i m e n s i o n s
i nc re a s e s , m a k i n g t h e m ideal for c o m p l e x datasets.
Limitations of SVM

W h i l e p o we rf u l , S u p p o r t Ve c t o r M a c h i n e s h a v e l i m i tati o n s t h a t c a n i m p a c t their a p p l i c a b i l i t y i n c e r t a i n s cena ri os .


O n e s i g n i fi c a n t d r a w b a c k is c o m p u t a ti o n a l c o m p l ex i t y. T h e t ra i n i n g ti m e for S V M s c a n r a n g e f r o m O(n² ) to O(n³),
w h e r e n is t h e n u m b e r of d a t a points , m a k i n g t h e m l e s s s u i ta b l e for v e r y l a r g e d ata s e t s . A n o t h e r c h a l l e n g e lies in
ke r n e l s el ecti on. C h o o s i n g t h e r i g h t ke r n e l f u n c ti o n is criti cal for S V M p e r f o r m a n c e , b u t t h e r e is n o uni vers a l l y
s y s t e m a ti c m e t h o d to d e t e r m i n e t h e o p ti m a l ke r n e l for a g i v e n p ro b l e m . F u r t h e r m o r e , S V M s a re s e n s i ti ve to
h y p e r p a ra m e t e r t u n i n g . S m a l l c h a n g e s i n h y p e r p a ra m e t e r s c a n l e a d to s u b s t a n ti a l va ri ati o n s i n m o d e l
p e r f o r m a n c e , r e q u i r i n g c a ref u l a n d o ft e n c o m p u t a ti o n a l l y i n te n s i v e opti m izati on.
SVM vs Other ML Algorithms

C o m p a r e d to o t h e r m a c h i n e l e a r n i n g a l g o r i t h m s , S V M s h a v e d i sti n c t c h a ra c te r i sti c s . N e u ra l N e t w o r k s a re m o r e
s u i ta b l e for v e r y l a r g e d a t a s e t s a n d c o m p l e x p att e r n r e c o g n i ti o n ta s k s , w h i l e D e c i s i o n Tre e s p ro v i d e b ett er
interpretability. k- N e a re st N e i g h b o r s off ers a s i m p l e r i m p l e m e n t a ti o n w i t h n o t ra i n i n g ti me, b u t its p e r fo r m a n c e
d e g ra d e s in high-dimensional spaces.
A One-Class SVM
O n e - C l a s s S V M is a n u n s u p e r v i s e d l e a r n i n g t e c h n i q u e p ri m a r i l y e m p l o y e d for outlier d e te c ti o n . I n c o n t ra s t to
traditi onal SV M s , w h i c h n e c e s s i t a t e l a b e l e d d a t a for b o t h n o r m a l a n d a b n o r m a l i n s t a n c e s , O n e - C l a s s S V M re q u i re s
o n l y n o r m a l d a t a to l e a r n a b o u n d a r y t h a t c l o s e l y e n c o m p a s s e s t h e d a t a points, t h e r e b y eff ec ti ve l y i d e n ti f y i n g
a n o m a l i e s . T h i s c h a ra c te r i s ti c m a k e s it exc e p ti o n a l l y va l u a b l e i n s i t u ati o n s w h e r e a n o m a l i e s a re s c a r c e or w h e r e
o b t a i n i n g l a b e l e d e x a m p l e s is c h a l l e n g i n g .

T h e R a d i a l B a s i s F u n c ti o n ( R B F ) ke r n e l is f r e q u e n t l y fav o r e d for t h i s p u r p o s e d u e to its a d a p ta b i l i t y i n c a p t u r i n g


i nt r i c ate d a t a distributi ons . B y p r o j e c ti n g t h e i n p u t d a t a i nto a h i g h e r - d i m e n s i o n a l s p a c e , t h e R B F ke r n e l e n a b l e s
t h e a l g o r i t h m to e st a b l i s h a m o r e p r e c i s e a n d a d a p t a b l e b o u n d a r y a r o u n d t h e n o r m a l d a t a points. O n e - C l a s s S V M
h a s d e m o n s t r a t e d w i d e s p r e a d uti lity i n va r i o u s a p p l i c ati o n s , i n c l u d i n g t h e d e t e c ti o n of n e t w o r k intrusions,
i d e nti fi c ati o n of f ra u d u l e n t t ra n s a c ti o n s , a n d m o n i t o r i n g of m a c h i n e h e a l t h b y r e c o g n i z i n g a t y p i c a l patt erns.
Implementation in Python
S u p p o r t Ve c t o r M a c h i n e s c a n b e re a d i l y i m p l e m e n t e d i n P y t h o n u s i n g p o w e r f u l libraries l i ke S c i k i t- l e a r n a n d L I B S V M . T h e c o d e s n i p p e t
b e l o w d e m o n s t r a t e s a t y p i c a l s t r u c t u r e for s e tti n g u p a n d t ra i n i n g a n S V M m o d e l .

from sklearn.svm import S VC I m p o r t s t h e S u p p o r t Ve c t o r Cl a ssi fi er m o d e l


from sklearn.preprocessing import StandardScaler I m p o r t s t h e S t a n d a r d S c a l e r for fe at u re s c a l i n g
f r o m s k l e a r n . m o d e l _ s e l e c ti o n i m p o r t G r i d S e a rc h C V, train_test_split I m p o r t s tool s for h y p e r p a ra m e t e r t u n i n g a n d d a t a spl i tti ng
f r o m s k l e a r n . m e t r i c s i m p o r t classifi cati on_report I m p o r t s t h e f u n c ti o n to g e n e r a t e a c l a s s i fi cati o n report
Practical Considerations

W h e n w o r k i n g w i t h S u p p o r t Ve c t o r Ma c hi ne s , s eve ra l p ra c ti c a l c o n s i d e ra ti o n s c a n s i g n i fi ca nt l y i m p a c t m o d e l p e r fo r m a n c e
a n d effi ciency. F e a t u r e s e l e c ti o n b e s t p ra c ti c e s i n c l u d e e m p l o y i n g fi lter m e t h o d s (e.g., s e l e c ti n g fe at u re s b a s e d o n stati sti ca l
tests), w ra p p e r m e t h o d s (e.g., u s i n g c r o s s - va li dati o n to e va l u ate fe at ure s ubs et s ), a n d e m b e d d e d m e t h o d s (e.g., L1
regularizati on). H a n d l i n g i m b a l a n c e d data s et s , w h e r e o n e c l a s s s i g n i fi ca nt l y o u t n u m b e r s t h e other, c a n b e a d d r e s s e d
t h r o u g h c l a s s w e i g h ti n g ( a d j u s ti n g t h e c o s t of m i s c l a s s i fi c ati o n for t h e m i n o r i t y c l a s s ) or r e s a m p l i n g t e c h n i q u e s
(o v e r s a m p l i n g t h e m i n o r i t y c l a s s or u n d e r s a m p l i n g t h e ma j o ri t y class). C o m p u t a ti o n a l o pti mi zati o ns , s u c h a s a p p r ox i m ate
ke r n e l m e t h o d s (e.g., N y s t r ö m m e t h o d s ) , a re c r u c i a l for s c a l i n g S V M s to l a r g e d a t a s e t s b y r e d u c i n g c o m p u t a ti o n a l
c o m p l ex i t y. Eff e c ti v e m e m o r y m a n a g e m e n t st rate g i e s , i n c l u d i n g u s i n g s p a r s e m a t r i c e s a n d o p ti m i z i n g d a t a sto ra ge , are a l so
i m p o r t a n t for h a n d l i n g l a rge - s c a l e S V M pro bl e ms .
Unlocking the Power of
SVMs: Advances and
Practical Guidance
T h i s p r e s e n t a ti o n p r o v i d e s a c o m p r e h e n s i v e o v e r v i e w of r e c e n t
p r o g r e s s a n d p r o v e n t e c h n i q u e s i n S u p p o r t Ve c t o r M a c h i n e s
(SVMs). K e y t o p i c s i n c l u d e t w i n SV M s , m u l ti p l e ke r n e l l earni ng ,
a n d d e e p ke r n e l l e a r n i n g , a l o n g w i t h p ra c ti c a l i m p l e m e n t a ti o n
st rate g i e s , i n s i g h tf u l c a s e st u d i es , a n d p r o m i s i n g a v e n u e s for
f u t u re explorati on.
Evolving SVM Architectures
Twin Support Vector Machines Multiple Kernel Learning Deep Kernel Learning
• U s e s t w o n o n - parallel • O p ti m a l l y c o m b i n e s d i ve rs e • I n t e g ra t e s d e e p n e u ra l
hyperplanes ke r n e l s n e t w o r k s w i t h ke r n e l s
• Fa s t e r t ra i n i n g d u e to s m a l l e r • L e a r n s a d a p ti v e ke r n e l • L e a r n s fe at u re re p re s e nta ti o n s
QPPs weights for S V M
• • E n h a n c e s performance with •
Eff e c ti v e for n o n - linear O p ti m i z e s fe at u re l e a r n i n g e n d -
cl a s s i fi cati on va r i e d feat u re s to-e n d
SVM Adaptations for
Dynamic Data
Online SVMs
A d a p t a b l e l e a r n i n g for e v o l v i n g datas ets .

Incremental SVMs
Effi c i e nt l y u p d a t e s m o d e l s w i t h n e w d a t a points,
a v o i d i n g c o m p l e t e retraining.

Quantum SVMs
L e v e r a g e s q u a n t u m c o m p u t a ti o n to a c c e l e ra t e S V M
t ra i n i n g for c o m p l e x datas ets .
Case Study: Enhanced
Protein Secondary
Structure Prediction with
SVMs
Dataset Features
U ti l i z i n g t h e CB513 Employing a
b e n c h m a r k dataset c o m p r e h e n s i v e s e t of 2 0
a m i n o a c i d feat u re s
C o n s i s ti n g of 513 d i ve rs e
p ro te i n s e q u e n c e s

Challenge
A d d r e s s i n g t h e c h a l l e n g e s of h i g h d i m e n s i o n a l i t y i n feat u re
space

M o d e l i n g c o m p l e x s pati al re l ati o n s h i p s b e t w e e n a m i n o
acids
Implementation and Results
Feature Extraction Kernel Strategy

E m p l o y e d p o s i ti o n - s p e c i fi c s c o r i n g I m p l e m e n t e d t h e R B F kernel, A d o p t e d a O n e - v s - O n e m u l ti - c l a s s
m a t r i x ( P S S M ) to c a p t u r e o p ti m i z i n g p a ra m e t e r s for s t ra t e g y for effi ci ent a n d a c c u ra t e
e vo l u ti o n a r y informati on. e n h a n c e d c l a s s i fi c a ti o n a c c u ra c y. p ro te i n s e c o n d a r y st r u c t u re
predicti on.
U ti l i zed a s l i d i n g w i n d o w a p p r o a c h
to m o d e l s e q u e n ti a l d e p e n d e n c i e s
b e t w e e n a m i n o acids.
Analysis and Lessons Learned
Error Patterns Strengths
A n a l y s i s re ve a l s error The SVM model
p a tt e r n s a s s o c i a t e d w i t h d e m o n s t r a t e s parti cular
s p e c i fi c a m i n o a c i d types. s t r e n g t h i n p r e d i c ti n g b eta -
S o m e a m i n o a c i d s are s h e e t st r u c t u re s . T h e m o d e l
c o n s i s te n t l y m i s c l a s s i fi e d eff ec ti ve l y c a p t u r e s t h e
d u e to their st r u ct u ra l h y d r o g e n b o n d i n g p a tt e r n s
sim ilariti es or a m b i g u o u s c h a ra c te r i s ti c of b e t a - s h eet s .
fe at u re repres entati ons .

Limitations
P e r f o r m a n c e is l i m i te d i n va ri a b l e r e g i o n s of proteins , w h e r e
s e q u e n c e c o n s e r v a ti o n is l o w a n d st r u c t u ra l fl exibility is h i g h .
T h e m o d e l s t r u g g l e s to g e n e ra l i z e f r o m t h e ava i l a b l e t ra i n i n g
data.
When to Use SVMs
Dataset Size
M e d i u m - s i z e d d a t a s e t s a re ideal.

Dimensionality
H i g h - d i m e n s i o n a l p ro b l e m s .

Relationships
C o m p l e x n o n - linear.

Tradeoffs
A c c u r a c y o ve r t ra i n i n g ti me.
Preprocessing and Workflow Recommendations
Feature Scaling
E s s enti a l ; sta n d a rd i za ti o n t e c h n i q u e s a re g e n e ra l l y p refe r re d for o p ti m a l S V M p e r fo r m a n c e .

Missing Values
C a re f u l i m p u t a ti o n st ra t e g i e s a re n e c e s s a r y to av o i d b i a s a n d m a i n t a i n d a t a integrity.

Categorical Variables
A p p l y a p p ro p r i a te e n c o d i n g m e t h o d s , s u c h a s o n e - h o t e n c o d i n g , to c o n v e r t c a t e g o r i c a l fe a t u re s into n u m e r i c a l
representati ons.
Summary and Conclusion
• SV M s : O p ti m a l m a r g i n classifi ers.
• K e r n e l m e t h o d s : E n a b l e n o n - linear d e c i s i o n b o u n d a r i es .
• S u p p o r t vectors : Cri ti ca l for d e fi n i n g b o u n d a r i e s .
• H y p e r p a ra m e t e r o p ti m i zati o n : K e y to p e r fo r m a n c e .

S V M s p r o v i d e a r o b u s t f r a m e w o r k for b o t h c l a s s i fi c a ti o n a n d r e g r e s s i o n ta s ks . F u r t h e r a d v a n c e s lie i n hy b r i d
m o d e l s i n c o r p o ra ti n g d e e p l e a r n i n g t e c h n i q u e s a n d e n h a n c e d s cal abi l i ty soluti ons.
References
• Va p n i k , V. (1995). T h e N a t u r e of S tati sti c a l L e a r n i n g Theory.
S p r i n ge r.
• S c h o l ko p f, B., & S m o l a , A. J. (2002). L e a r n i n g w i t h Ke r n e l s .
MIT P re s s .
• C h a n g , C. C., & Lin, C. J. (2011). L I B S V M : A library for s u p p o r t
vector machines.
• Cristi anini, N., & S h a w e - Taylor, J. (2000). A n I n t r o d u c ti o n to
S u p p o r t Ve c t o r M a c h i n es .

You might also like