SlideShare une entreprise Scribd logo
1  sur  28
Support Vector Machines
Carlo Carandang, Seyoon Han, Kyle Lindsay, Michael Nisbet
NSCC Presentation
April 3, 2017
Support Vector Machines
• In this presentation, we approach a two-class classification problem.
• We try to find a plane that separates the class in the feature space,
also called a hyperplane.
• If we can’t find the hyperplane, then we can be creative in two ways:
1. We soften what we mean by separate, and
2. We enrich and enlarge the featured space so that separation is possible
What Is a Hyperplane
Hyperplane in 2 Dimensions
Separating Hyperplanes
Maximal Margin Classifier
*This can be rephrased as a convex quadratic program and solved
efficiently. The function svm() in package e1071 solves this problem
efficiently.
The data on the left are not
separable by a linear boundary.
This is often the case, unless N < p.
Non-separable Data
Noisy Data
Sometimes the data are separable, but noisy. This can lead to a poor
solution for the maximal-margin classifier.
The support vector classifier maximizes a soft margin.
Support Vector Classifier
C is a Regularization parameter
Linear boundary can fail
Sometimes a linear boundary simply
won’t work, no matter what value
of C.
The example is on the left is the
case.
What to do?
Support Vector Classifier and Non-Linear
Class Boundaries
• The support vector classifier is a natural approach for classification in
the two-class setting, if the boundary between the two classes is
linear
• However, in practice we are sometimes faced with non-linear class
boundaries
• In this case, the soft margin is not going to help
Feature Expansion- Linear Regression
• In Chapter 7, we saw that linear regression suffers when there is a
non-linear relationship between predictors (independent variables)
and the outcome measures (dependent variables)
• The solution is enlarging the feature space using functions of the
predictors, such as quadratics and cubic terms, in order to address
this non-linearity:
• ax2 + bx + c = 0 (quadratic)
• ax3 + bx2 + cx + d = 0 (cubic)
Feature Expansion- Support Vector Classifier
• So for Support Vector Classifier, we can address non-linear boundaries
between classes in a similar way, by enlarging the feature space using
quadratic, cubic, and higher-order polynomial functions of the
predictors
• For instance, rather than fitting a support vector classifier using p
features:
X1, X2, . . . , Xp
• We can instead fit a support vector classifier using 2p features:
X1, X1
2, X2, X2
2, . . . , Xp, Xp
2
Support Vector Machine
• This results in non-linear decision
boundaries in the original space
• Here is a cubic polynomial (X3)-
degree 3
• Decision boundary split in two
• Conic section of a cubic polynomial
• This feature expansion of the support
vector classifier known as the
SUPPORT VECTOR MACHINE
• Β0 + β1X1 + β2X2 + β3X1
2 + β4X2
2 + β5X1X2
+ β6X1
3 + β7X2
3 + β8X1X 2
2 + β9X1
2X2 = 0
Non-Linearities and Kernels
• Polynomials (especially high-dimensional ones) get wild rather fast
• In regression, we don’t like doing polynomial regression with degree
larger than 3
• In support-vector classifiers, there is a more elegant and controlled
way to introduce nonlinearities— through the use of kernels
• Before we discuss these, we must understand the role of inner
products in support-vector classifiers
Inner Products and Support Vectors
• If we can compute the inner products between all pairs of
observations and if we can also compute the inner products between
all the training observations and a new test point, then we can both
fit the support vector machine and evaluate the function
Support Vectors
Support Vectors
• Support vectors (support points) are the alphas that are not zero
• If a point is not a support point, then it is on the right side of the
margin, and it does not affect the direction of the decision boundary
• The alphas are assigning weights to the data points, and the ones that
are zero (right side of the margin) have no bearing on the solution,
while the data points that are not zero (support points) affect the
solution
Kernels and Support Vector Machines
• Computing the inner products between observations can be quite
abstract
• Kernel functions can help and do this abstract math and compute the
inner products for us:
Kernels and Support Vector Machines
• We don't need to actually visit the feature space because this kernel
function will compute those inner products- sort of like magic
• You've got a kernel function the computes this inner product in this
very high dimensional space
• The support vector machine (SVM) is an extension of the support
vector classifier that results from enlarging the feature space in a
specific way using kernels
Radial Kernel
• Radial kernels are very popular
• One of the most popular kernels that's used for non-linear support
vector machines
• With feature expansion of support vector classifier, you'd run into
trouble raising power to 1,000,000
• But with a polynomial kernel in SVMs, you could get away with that
because of all the squishing of the dimensions to zero
Reference:
Stanford University HumanitiesScience StatLearning:
https://lagunita.stanford.edu/c4x/HumanitiesSciences/StatLearning/as
set/svm-handout.pdf

Contenu connexe

Tendances

Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Simplilearn
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
Musa Hawamdah
 

Tendances (20)

Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Support Vector machine
Support Vector machineSupport Vector machine
Support Vector machine
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Linear discriminant analysis
Linear discriminant analysisLinear discriminant analysis
Linear discriminant analysis
 
Machine Learning with Decision trees
Machine Learning with Decision treesMachine Learning with Decision trees
Machine Learning with Decision trees
 
Support Vector Machine and Implementation using Weka
Support Vector Machine and Implementation using WekaSupport Vector Machine and Implementation using Weka
Support Vector Machine and Implementation using Weka
 
Support vector machine-SVM's
Support vector machine-SVM'sSupport vector machine-SVM's
Support vector machine-SVM's
 
Support Vector Machines ( SVM )
Support Vector Machines ( SVM ) Support Vector Machines ( SVM )
Support Vector Machines ( SVM )
 
Feature selection
Feature selectionFeature selection
Feature selection
 
Reinforcement learning
Reinforcement learning Reinforcement learning
Reinforcement learning
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant Analysis
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
 
Vc dimension in Machine Learning
Vc dimension in Machine LearningVc dimension in Machine Learning
Vc dimension in Machine Learning
 
2.6 support vector machines and associative classifiers revised
2.6 support vector machines and associative classifiers revised2.6 support vector machines and associative classifiers revised
2.6 support vector machines and associative classifiers revised
 
Machine learning ppt.
Machine learning ppt.Machine learning ppt.
Machine learning ppt.
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Types of Machine Learning
Types of Machine LearningTypes of Machine Learning
Types of Machine Learning
 

Similaire à Support Vector Machines- SVM

Similaire à Support Vector Machines- SVM (20)

Module-3_SVM_Kernel_KNN.pptx
Module-3_SVM_Kernel_KNN.pptxModule-3_SVM_Kernel_KNN.pptx
Module-3_SVM_Kernel_KNN.pptx
 
Extra Lecture - Support Vector Machines (SVM), a lecture in subject module St...
Extra Lecture - Support Vector Machines (SVM), a lecture in subject module St...Extra Lecture - Support Vector Machines (SVM), a lecture in subject module St...
Extra Lecture - Support Vector Machines (SVM), a lecture in subject module St...
 
support vector machine 1.pptx
support vector machine 1.pptxsupport vector machine 1.pptx
support vector machine 1.pptx
 
svm.pptx
svm.pptxsvm.pptx
svm.pptx
 
Anomaly Detection and Localization Using GAN and One-Class Classifier
Anomaly Detection and Localization  Using GAN and One-Class ClassifierAnomaly Detection and Localization  Using GAN and One-Class Classifier
Anomaly Detection and Localization Using GAN and One-Class Classifier
 
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
 
sentiment analysis using support vector machine
sentiment analysis using support vector machinesentiment analysis using support vector machine
sentiment analysis using support vector machine
 
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
 
Svm ms
Svm msSvm ms
Svm ms
 
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
 
Classification-Support Vector Machines.pptx
Classification-Support Vector Machines.pptxClassification-Support Vector Machines.pptx
Classification-Support Vector Machines.pptx
 
super vector machines algorithms using deep
super vector machines algorithms using deepsuper vector machines algorithms using deep
super vector machines algorithms using deep
 
Support Vector Machines USING MACHINE LEARNING HOW IT WORKS
Support Vector Machines USING MACHINE LEARNING HOW IT WORKSSupport Vector Machines USING MACHINE LEARNING HOW IT WORKS
Support Vector Machines USING MACHINE LEARNING HOW IT WORKS
 
properties, application and issues of support vector machine
properties, application and issues of support vector machineproperties, application and issues of support vector machine
properties, application and issues of support vector machine
 
Data Science - Part IX - Support Vector Machine
Data Science - Part IX -  Support Vector MachineData Science - Part IX -  Support Vector Machine
Data Science - Part IX - Support Vector Machine
 
Support Vector Machine topic of machine learning.pptx
Support Vector Machine topic of machine learning.pptxSupport Vector Machine topic of machine learning.pptx
Support Vector Machine topic of machine learning.pptx
 
OM-DS-Fall2022-Session10-Support vector machine.pdf
OM-DS-Fall2022-Session10-Support vector machine.pdfOM-DS-Fall2022-Session10-Support vector machine.pdf
OM-DS-Fall2022-Session10-Support vector machine.pdf
 
1629 stochastic subgradient approach for solving linear support vector
1629 stochastic subgradient approach for solving linear support vector1629 stochastic subgradient approach for solving linear support vector
1629 stochastic subgradient approach for solving linear support vector
 
Notes relating to Machine Learning and SVM
Notes relating to Machine Learning and SVMNotes relating to Machine Learning and SVM
Notes relating to Machine Learning and SVM
 
Support vector machines
Support vector machinesSupport vector machines
Support vector machines
 

Plus de Carlo Carandang

Plus de Carlo Carandang (20)

Psychosis in Youth
Psychosis in YouthPsychosis in Youth
Psychosis in Youth
 
Metyrosine and Psychosis
Metyrosine and PsychosisMetyrosine and Psychosis
Metyrosine and Psychosis
 
Lamotrigine for Treatment Refractory Mood Disorders in Adolescents: A Case Se...
Lamotrigine for Treatment Refractory Mood Disorders in Adolescents: A Case Se...Lamotrigine for Treatment Refractory Mood Disorders in Adolescents: A Case Se...
Lamotrigine for Treatment Refractory Mood Disorders in Adolescents: A Case Se...
 
Anxiety Disorders
Anxiety DisordersAnxiety Disorders
Anxiety Disorders
 
Metyrosine in Adolescent Psychosis Associated with 22q11.2 Deletion Syndrome
Metyrosine in Adolescent Psychosis Associated with 22q11.2 Deletion SyndromeMetyrosine in Adolescent Psychosis Associated with 22q11.2 Deletion Syndrome
Metyrosine in Adolescent Psychosis Associated with 22q11.2 Deletion Syndrome
 
Velocardiofacial Syndrome Associated with Adolescent Psychosis
Velocardiofacial Syndrome Associated with Adolescent PsychosisVelocardiofacial Syndrome Associated with Adolescent Psychosis
Velocardiofacial Syndrome Associated with Adolescent Psychosis
 
Clinical Assessment of Children and Adolescents with Depression
Clinical Assessment of Children and Adolescents with DepressionClinical Assessment of Children and Adolescents with Depression
Clinical Assessment of Children and Adolescents with Depression
 
Data Safety Monitoring Boards in Pediatric Clinical Trials
Data Safety Monitoring Boards in Pediatric Clinical TrialsData Safety Monitoring Boards in Pediatric Clinical Trials
Data Safety Monitoring Boards in Pediatric Clinical Trials
 
Teen Depression and Suicide
Teen Depression and SuicideTeen Depression and Suicide
Teen Depression and Suicide
 
Pediatric Bipolar Disorder
Pediatric Bipolar DisorderPediatric Bipolar Disorder
Pediatric Bipolar Disorder
 
SSRIs and Suicidality in Youth
SSRIs and Suicidality in YouthSSRIs and Suicidality in Youth
SSRIs and Suicidality in Youth
 
The Neurobiology of Adolescent Development
The Neurobiology of Adolescent DevelopmentThe Neurobiology of Adolescent Development
The Neurobiology of Adolescent Development
 
Canadian Psychiatry: The Case for Universal Health Care and How Psychiatry Be...
Canadian Psychiatry: The Case for Universal Health Care and How Psychiatry Be...Canadian Psychiatry: The Case for Universal Health Care and How Psychiatry Be...
Canadian Psychiatry: The Case for Universal Health Care and How Psychiatry Be...
 
Clinical assessment of child and adolescent psychiatric emergencies
Clinical assessment of child and adolescent psychiatric emergenciesClinical assessment of child and adolescent psychiatric emergencies
Clinical assessment of child and adolescent psychiatric emergencies
 
Computer Anxiety
Computer AnxietyComputer Anxiety
Computer Anxiety
 
AI and Big Data in Psychiatry: An Introduction and Overview
AI and Big Data in Psychiatry: An Introduction and OverviewAI and Big Data in Psychiatry: An Introduction and Overview
AI and Big Data in Psychiatry: An Introduction and Overview
 
Air Pollution in Nova Scotia: Analysis and Predictions
Air Pollution in Nova Scotia: Analysis and PredictionsAir Pollution in Nova Scotia: Analysis and Predictions
Air Pollution in Nova Scotia: Analysis and Predictions
 
Workplace Disability from Stress, Anxiety, and Depression: Solutions and Prev...
Workplace Disability from Stress, Anxiety, and Depression: Solutions and Prev...Workplace Disability from Stress, Anxiety, and Depression: Solutions and Prev...
Workplace Disability from Stress, Anxiety, and Depression: Solutions and Prev...
 
Analysis of Air Pollution in Nova Scotia Presentation
Analysis of Air Pollution in Nova Scotia PresentationAnalysis of Air Pollution in Nova Scotia Presentation
Analysis of Air Pollution in Nova Scotia Presentation
 
Paxil Study 329 Retracted: A Critical Statistical Analysis
Paxil Study 329 Retracted: A Critical Statistical AnalysisPaxil Study 329 Retracted: A Critical Statistical Analysis
Paxil Study 329 Retracted: A Critical Statistical Analysis
 

Dernier

Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
amitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 

Dernier (20)

Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 

Support Vector Machines- SVM

  • 1. Support Vector Machines Carlo Carandang, Seyoon Han, Kyle Lindsay, Michael Nisbet NSCC Presentation April 3, 2017
  • 2. Support Vector Machines • In this presentation, we approach a two-class classification problem. • We try to find a plane that separates the class in the feature space, also called a hyperplane. • If we can’t find the hyperplane, then we can be creative in two ways: 1. We soften what we mean by separate, and 2. We enrich and enlarge the featured space so that separation is possible
  • 3. What Is a Hyperplane
  • 4. Hyperplane in 2 Dimensions
  • 6. Maximal Margin Classifier *This can be rephrased as a convex quadratic program and solved efficiently. The function svm() in package e1071 solves this problem efficiently.
  • 7. The data on the left are not separable by a linear boundary. This is often the case, unless N < p. Non-separable Data
  • 8. Noisy Data Sometimes the data are separable, but noisy. This can lead to a poor solution for the maximal-margin classifier. The support vector classifier maximizes a soft margin.
  • 10. C is a Regularization parameter
  • 11. Linear boundary can fail Sometimes a linear boundary simply won’t work, no matter what value of C. The example is on the left is the case. What to do?
  • 12. Support Vector Classifier and Non-Linear Class Boundaries • The support vector classifier is a natural approach for classification in the two-class setting, if the boundary between the two classes is linear • However, in practice we are sometimes faced with non-linear class boundaries • In this case, the soft margin is not going to help
  • 13.
  • 14. Feature Expansion- Linear Regression • In Chapter 7, we saw that linear regression suffers when there is a non-linear relationship between predictors (independent variables) and the outcome measures (dependent variables) • The solution is enlarging the feature space using functions of the predictors, such as quadratics and cubic terms, in order to address this non-linearity: • ax2 + bx + c = 0 (quadratic) • ax3 + bx2 + cx + d = 0 (cubic)
  • 15. Feature Expansion- Support Vector Classifier • So for Support Vector Classifier, we can address non-linear boundaries between classes in a similar way, by enlarging the feature space using quadratic, cubic, and higher-order polynomial functions of the predictors • For instance, rather than fitting a support vector classifier using p features: X1, X2, . . . , Xp • We can instead fit a support vector classifier using 2p features: X1, X1 2, X2, X2 2, . . . , Xp, Xp 2
  • 16. Support Vector Machine • This results in non-linear decision boundaries in the original space • Here is a cubic polynomial (X3)- degree 3 • Decision boundary split in two • Conic section of a cubic polynomial • This feature expansion of the support vector classifier known as the SUPPORT VECTOR MACHINE • Β0 + β1X1 + β2X2 + β3X1 2 + β4X2 2 + β5X1X2 + β6X1 3 + β7X2 3 + β8X1X 2 2 + β9X1 2X2 = 0
  • 17. Non-Linearities and Kernels • Polynomials (especially high-dimensional ones) get wild rather fast • In regression, we don’t like doing polynomial regression with degree larger than 3 • In support-vector classifiers, there is a more elegant and controlled way to introduce nonlinearities— through the use of kernels • Before we discuss these, we must understand the role of inner products in support-vector classifiers
  • 18.
  • 19. Inner Products and Support Vectors • If we can compute the inner products between all pairs of observations and if we can also compute the inner products between all the training observations and a new test point, then we can both fit the support vector machine and evaluate the function
  • 21. Support Vectors • Support vectors (support points) are the alphas that are not zero • If a point is not a support point, then it is on the right side of the margin, and it does not affect the direction of the decision boundary • The alphas are assigning weights to the data points, and the ones that are zero (right side of the margin) have no bearing on the solution, while the data points that are not zero (support points) affect the solution
  • 22. Kernels and Support Vector Machines • Computing the inner products between observations can be quite abstract • Kernel functions can help and do this abstract math and compute the inner products for us:
  • 23. Kernels and Support Vector Machines • We don't need to actually visit the feature space because this kernel function will compute those inner products- sort of like magic • You've got a kernel function the computes this inner product in this very high dimensional space • The support vector machine (SVM) is an extension of the support vector classifier that results from enlarging the feature space in a specific way using kernels
  • 24. Radial Kernel • Radial kernels are very popular • One of the most popular kernels that's used for non-linear support vector machines • With feature expansion of support vector classifier, you'd run into trouble raising power to 1,000,000 • But with a polynomial kernel in SVMs, you could get away with that because of all the squishing of the dimensions to zero
  • 25.
  • 26.
  • 27.
  • 28. Reference: Stanford University HumanitiesScience StatLearning: https://lagunita.stanford.edu/c4x/HumanitiesSciences/StatLearning/as set/svm-handout.pdf