SlideShare a Scribd company logo
1 of 17
Download to read offline
Support Vector Machine
➔ Most popular Supervised Learning algorithms.
➔ Used for both Classification and Regression tasks. (But widely used for
classification task)
➔ Works better for smaller size data.
➔ Works well with high dimensional space (independent variables)
➔ Works better where no. of features are greater than no. of obs.
➔ It doesn't perform well, when dataset has more noise i.e. target classes
are overlapping.
➔ It doesn't perform well, when we have large dataset because the required
training time is higher.
The goal of the support vector machine algorithm is to create the best
line or decision boundary in an n-dimensional space (n — the number
of features) that distinctly classifies the data points.
This best decision boundary is called a hyperplane.
Our objective is to find a plane that has the maximum margin, i.e
the maximum distance between data points of both classes.
Terminologies:
Margin: Margin is the perpendicular distance between
the closest data points and the hyperplane.
The best optimised line(hyperplane) with maximum
margin is termed as Margin Maximal Hyperplane.
The closest points where the margin distance is
calculated are considered as support Vectors.
➔ Support vectors are data points that are closer to the hyperplane
➔ Support vectors are influencers of the position and orientation of hyperplane
➔ With the help of support vectors, we maximise the margin of classifier.
➔ Support vectors are the points which help us to build the SVM classifier.
Terminologies:
Regularization:
➔ ‘C’ parameter in python sklearn library
➔ Optimises SVM classifier to avoid misclassifying the data
C = large Margin of Hyperplane = small
C = small Margin of Hyperplane = large
Problems with setting C values:
C small = chances of underfitting
C large = chances of overfitting
C = large
Margin of Hyperplane = small
C = small
Margin of Hyperplane = large
Terminologies:
Gamma:
➔ Defines how far influences the calculation of line of
separation.
➔ Low gamma - points far from hyperplane are considered for
the calculation
➔ High gamma - points close to hyperplane are considered for
the calculation
Outliers in the data can affect the threshold value and lead
to wrong predictions.
Terminologies:
Kernels:
➔ Kernel is the technique used
by SVM to classify the non-
linear data.
➔ Kernel functions are used to
increase the dimension of
the data, so that SVM can fit
the optimum hyperplane to
separate the data.
2D and 3D feature space
If the number of input features is 2, then the hyperplane is just a line.
If the number of input features is 3, then the hyperplane becomes a two-dimensional plane.
It becomes difficult to imagine when the number of features exceeds 3
Types of SVM
Non-Linear SVM
02
01
Linear SVM
Linear SVM is used for linearly separable data,
which means if a dataset can be classified into two
classes by using a single straight line
Non-Linear SVM is used for non-linearly
separated data.which means if a dataset
cannot be classified by using a straight line,
then such data is termed as non-linear data
and classifier used is called as Non-linear
SVM classifier.
Non-Linear SVM
SVM_notes.pdf

More Related Content

Similar to SVM_notes.pdf

Introduction to Machine Learning Elective Course
Introduction to Machine Learning Elective CourseIntroduction to Machine Learning Elective Course
Introduction to Machine Learning Elective Course
MayuraD1
 

Similar to SVM_notes.pdf (20)

Support vector machine-SVM's
Support vector machine-SVM'sSupport vector machine-SVM's
Support vector machine-SVM's
 
Support Vector machine(SVM) and Random Forest
Support Vector machine(SVM) and Random ForestSupport Vector machine(SVM) and Random Forest
Support Vector machine(SVM) and Random Forest
 
Support vector machine learning.pptx
Support vector machine learning.pptxSupport vector machine learning.pptx
Support vector machine learning.pptx
 
Support Vector Machines ( SVM )
Support Vector Machines ( SVM ) Support Vector Machines ( SVM )
Support Vector Machines ( SVM )
 
Classification-Support Vector Machines.pptx
Classification-Support Vector Machines.pptxClassification-Support Vector Machines.pptx
Classification-Support Vector Machines.pptx
 
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
 
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
 
svm.pptx
svm.pptxsvm.pptx
svm.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
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
 
Svm ms
Svm msSvm ms
Svm ms
 
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
 
Introduction to Support Vector Machines
Introduction to Support Vector MachinesIntroduction to Support Vector Machines
Introduction to Support Vector Machines
 
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
 
sentiment analysis using support vector machine
sentiment analysis using support vector machinesentiment analysis using support vector machine
sentiment analysis using support vector machine
 
AI Algorithms
AI AlgorithmsAI Algorithms
AI Algorithms
 
Lec_XX_Support Vector Machine Algorithm.pptx
Lec_XX_Support Vector Machine Algorithm.pptxLec_XX_Support Vector Machine Algorithm.pptx
Lec_XX_Support Vector Machine Algorithm.pptx
 
SVM & KNN Presentation.pptx
SVM & KNN Presentation.pptxSVM & KNN Presentation.pptx
SVM & KNN Presentation.pptx
 
Introduction to Machine Learning Elective Course
Introduction to Machine Learning Elective CourseIntroduction to Machine Learning Elective Course
Introduction to Machine Learning Elective Course
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

SVM_notes.pdf

  • 2. ➔ Most popular Supervised Learning algorithms. ➔ Used for both Classification and Regression tasks. (But widely used for classification task) ➔ Works better for smaller size data. ➔ Works well with high dimensional space (independent variables) ➔ Works better where no. of features are greater than no. of obs. ➔ It doesn't perform well, when dataset has more noise i.e. target classes are overlapping. ➔ It doesn't perform well, when we have large dataset because the required training time is higher.
  • 3. The goal of the support vector machine algorithm is to create the best line or decision boundary in an n-dimensional space (n — the number of features) that distinctly classifies the data points. This best decision boundary is called a hyperplane.
  • 4. Our objective is to find a plane that has the maximum margin, i.e the maximum distance between data points of both classes.
  • 5. Terminologies: Margin: Margin is the perpendicular distance between the closest data points and the hyperplane. The best optimised line(hyperplane) with maximum margin is termed as Margin Maximal Hyperplane. The closest points where the margin distance is calculated are considered as support Vectors.
  • 6. ➔ Support vectors are data points that are closer to the hyperplane ➔ Support vectors are influencers of the position and orientation of hyperplane ➔ With the help of support vectors, we maximise the margin of classifier. ➔ Support vectors are the points which help us to build the SVM classifier.
  • 7.
  • 8. Terminologies: Regularization: ➔ ‘C’ parameter in python sklearn library ➔ Optimises SVM classifier to avoid misclassifying the data C = large Margin of Hyperplane = small C = small Margin of Hyperplane = large Problems with setting C values: C small = chances of underfitting C large = chances of overfitting
  • 9. C = large Margin of Hyperplane = small C = small Margin of Hyperplane = large
  • 10. Terminologies: Gamma: ➔ Defines how far influences the calculation of line of separation. ➔ Low gamma - points far from hyperplane are considered for the calculation ➔ High gamma - points close to hyperplane are considered for the calculation
  • 11.
  • 12. Outliers in the data can affect the threshold value and lead to wrong predictions.
  • 13. Terminologies: Kernels: ➔ Kernel is the technique used by SVM to classify the non- linear data. ➔ Kernel functions are used to increase the dimension of the data, so that SVM can fit the optimum hyperplane to separate the data.
  • 14. 2D and 3D feature space If the number of input features is 2, then the hyperplane is just a line. If the number of input features is 3, then the hyperplane becomes a two-dimensional plane. It becomes difficult to imagine when the number of features exceeds 3
  • 15. Types of SVM Non-Linear SVM 02 01 Linear SVM Linear SVM is used for linearly separable data, which means if a dataset can be classified into two classes by using a single straight line Non-Linear SVM is used for non-linearly separated data.which means if a dataset cannot be classified by using a straight line, then such data is termed as non-linear data and classifier used is called as Non-linear SVM classifier.