SlideShare a Scribd company logo
4
Most read
21
Most read
24
Most read
Image Classification and Support Vector MachineShao-Chuan WangCITI, Academia Sinica1
Outline (1/2)Quick Review of SVMIntuitionFunctional margin and geometric marginOptimal margin classifierGeneralized Lagrangian multiplier methodsLagrangian dualityKernel and feature mappingSoft Margin ( l1 regularization)2
Outline (2/2)Some basis about Learning theoryBias/variance tradeoff (underfitting vs overfitting)Chernoff bound and VC dimensionModel selectionCross validationDimension ReductionMulticlass SVMOne against oneOne against allImage Classification by SVMProcessResults3
Intuition: MarginsFunctional MarginGeometric MarginWe feel more confident when functional margin is largerNote that scaling on w, b won’t  change the plane.4Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Maximize marginsOptimization problem: maximize minimal geometric margin under constraints.Introduce scaling factor such that5Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Lagrange dualityPrimal optimization problem:Generalized LagrangianPrimal optimization problem (equivalent form)Dual optimization problem:6Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Dual ProblemThe necessary conditions that equality holds:f, giare convex, and hi are affine.KKT conditions.7Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Optimal margin classifiersIts LagrangianIts dual problem8Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Kernel and feature mappingKernel:Positive semi-definiteSymmetricFor example:Loose Intuition“similarity” between features9Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Soft Margin (L1 regularization)C = ∞ leads to hard margin SVM, Rychetsky (2001)10Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Why doesn’t my model fit well on test data ?11
Some basis about Learning theoryBias/variance tradeoffunderfitting (high bias)                              (high variance) overfittingTraining Error = Generalization Error =12Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
Bias/variance tradeoffT. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning. Springer series in statistics. Springer, New York, 2001.13
Is training error a good estimator of generalization error?14
Chernoff bound (|H|=finite)Lemma: Assume Z1, Z2, …, Zmare drawn iid from Bernoulli(φ), and	and let γ > 0 be fixed. Then,	based on this lemma, one can find, with probability 1-δ(k = # of hypotheses)15Andrew Ng. Part VI Learning Theory. CS229 Lecture Notes (2008).
Chernoff bound (|H|=infinite)VC Dimension d : The size of largest set that H can shatter.e.g. H = linear classifiersin 2-DVC(H) = 3With probability at least 1-δ,16Andrew Ng. Part VI Learning Theory. CS229 Lecture Notes (2008).
Model SelectionCross Validation: Estimator of generalization errorK-fold: train on k-1 pieces, test on the remaining (here we will get one test error estimation).    Average k test error estimations, say, 2%. Then 2% is the estimation of generalization error for this machine learner.Leave-one-out cross validation (m-fold, m = training sample size)traintrainvalidatetraintraintrain17
Model SelectionLoop possible parameters:Pick one set of parameter, e.g. C = 2.0Do cross validation, get a error estimationPick the Cbest (with minimal error estimation) as the parameter18
Dimensionality ReductionWhich features are more “important”?Wrapper model feature selectionForward/backward search: add/remove a feature at a time, then evaluate the model with the new feature set.Filter feature selectionCompute score S(i) that measures how informative xi is about the class label yS(i) can be correlation Corr(x_i, y), or mutual information MI(x_i, y), etc.Principal Component Analysis (PCA)Vector Quantization (VQ)19
Multiclass SVMOne against oneThere are         binary SVMs. (1v2, 1v3, …)To predict, each SVM can vote between 2 classes.One against allThere are k binary SVMs. (1 v rest, 2 v rest, …)To predict, evaluate                     , pick the largest.Multiclass SVM by solving ONE optimization problemK = 135321123456K = 3poll Crammer, K., & Singer, Y. (2001). On the algorithmic implementation of multiclass kernel-based vector machines. JMLR, 2, 265-292.20
Image Classification by SVMProcessK = 61/4 3/41 0:49 1:25 …1 0:49 1:25 …:     :2 0:49 1:25 …:Test DataAccuracy21
Image Classification by SVMResultsRun Multi-class SVM 100 times for both (linear/Gaussian).Accuracy Histogram22
Image Classification by SVMIf we throw object data that the machine never saw before.23
~ Thank You ~Shao-Chuan WangCITI, Academia Sinica24

More Related Content

PPSX
Image Enhancement in Spatial Domain
PDF
Image restoration
PPTX
Swin transformer
PDF
Convolutional Neural Networks (CNN)
PPT
Segmentation
PPTX
Image segmentation techniques
PPTX
Image processing second unit Notes
PDF
Digital Image Processing: Image Segmentation
Image Enhancement in Spatial Domain
Image restoration
Swin transformer
Convolutional Neural Networks (CNN)
Segmentation
Image segmentation techniques
Image processing second unit Notes
Digital Image Processing: Image Segmentation

What's hot (20)

PPTX
Edge detection
PPT
introduction to pattern recognition
PPSX
Edge Detection and Segmentation
PPTX
Chapter 1 and 2 gonzalez and woods
PPTX
Chapter 9 morphological image processing
PPTX
Convolutional Neural Network and Its Applications
PPTX
Spatial Filters (Digital Image Processing)
PDF
Lec7: Medical Image Segmentation (I) (Radiology Applications of Segmentation,...
PPTX
Chapter 3 image enhancement (spatial domain)
PDF
Feature Extraction
PPTX
CNN Tutorial
PPT
Image segmentation ppt
PPTX
Digital Image Processing
PPTX
Computer Vision harris
PPTX
Convolutional neural network
PPT
Image Restoration
PPTX
Pattern Recognition.pptx
PPTX
Machine Learning - Convolutional Neural Network
PPTX
CNN and its applications by ketaki
Edge detection
introduction to pattern recognition
Edge Detection and Segmentation
Chapter 1 and 2 gonzalez and woods
Chapter 9 morphological image processing
Convolutional Neural Network and Its Applications
Spatial Filters (Digital Image Processing)
Lec7: Medical Image Segmentation (I) (Radiology Applications of Segmentation,...
Chapter 3 image enhancement (spatial domain)
Feature Extraction
CNN Tutorial
Image segmentation ppt
Digital Image Processing
Computer Vision harris
Convolutional neural network
Image Restoration
Pattern Recognition.pptx
Machine Learning - Convolutional Neural Network
CNN and its applications by ketaki
Ad

Viewers also liked (20)

PDF
Support Vector Machines for Classification
PPT
Support Vector machine
PPT
Support Vector Machines
PPTX
Support Vector Machine
PDF
Lecture12 - SVM
PPTX
Support vector machine
PPTX
Support Vector Machines (SVM) - Text Analytics algorithm introduction 2012
PPTX
Support Vector Machine without tears
PPTX
Support Vector Machine(SVM) with Iris and Mushroom Dataset
PDF
Support Vector Machine
PPTX
Support Vector Machine (SVM) Based Classifier For Khmer Printed Character-set...
PDF
View classification of medical x ray images using pnn classifier, decision tr...
PDF
How to use SVM for data classification
PPTX
PPTX
Automatic handwriting recognition
PDF
Linear regression without tears
PPT
optical character recognition system
DOCX
Hand Written Character Recognition Using Neural Networks
PDF
Data Science - Part IX - Support Vector Machine
PDF
State of the Word 2011
Support Vector Machines for Classification
Support Vector machine
Support Vector Machines
Support Vector Machine
Lecture12 - SVM
Support vector machine
Support Vector Machines (SVM) - Text Analytics algorithm introduction 2012
Support Vector Machine without tears
Support Vector Machine(SVM) with Iris and Mushroom Dataset
Support Vector Machine
Support Vector Machine (SVM) Based Classifier For Khmer Printed Character-set...
View classification of medical x ray images using pnn classifier, decision tr...
How to use SVM for data classification
Automatic handwriting recognition
Linear regression without tears
optical character recognition system
Hand Written Character Recognition Using Neural Networks
Data Science - Part IX - Support Vector Machine
State of the Word 2011
Ad

Similar to Image Classification And Support Vector Machine (20)

PDF
Computer Vision: Algorithms and Applications Richard Szeliski
PPT
PPT-3.ppt
PPT
MAchine learning
PPT
Machine Learning Machine Learnin Machine Learningg
PPT
i i believe is is enviromntbelieve is is enviromnt7.ppt
PPT
Machine Learning workshop by GDSC Amity University Chhattisgarh
PPT
Machine Learning Deep Learning Machine learning
PPTX
How Machine Learning Helps Organizations to Work More Efficiently?
PPT
PPT
SVM (2).ppt
PPT
2.6 support vector machines and associative classifiers revised
PPT
Introduction to Support Vector Machine 221 CMU.ppt
PPTX
super vector machines algorithms using deep
PPT
4.Support Vector Machines.ppt machine learning and development
PPTX
Machine learning interviews day2
PPT
PERFORMANCE EVALUATION PARAMETERS FOR MACHINE LEARNING
PPTX
ML-Lec-17-SVM,sshwqw - Non-Linear (1).pptx
DOC
Introduction to Support Vector Machines
PDF
Application of combined support vector machines in process fault diagnosis
Computer Vision: Algorithms and Applications Richard Szeliski
PPT-3.ppt
MAchine learning
Machine Learning Machine Learnin Machine Learningg
i i believe is is enviromntbelieve is is enviromnt7.ppt
Machine Learning workshop by GDSC Amity University Chhattisgarh
Machine Learning Deep Learning Machine learning
How Machine Learning Helps Organizations to Work More Efficiently?
SVM (2).ppt
2.6 support vector machines and associative classifiers revised
Introduction to Support Vector Machine 221 CMU.ppt
super vector machines algorithms using deep
4.Support Vector Machines.ppt machine learning and development
Machine learning interviews day2
PERFORMANCE EVALUATION PARAMETERS FOR MACHINE LEARNING
ML-Lec-17-SVM,sshwqw - Non-Linear (1).pptx
Introduction to Support Vector Machines
Application of combined support vector machines in process fault diagnosis

More from Shao-Chuan Wang (9)

PPTX
Book Cover Recognition
PPTX
Introduction to Machine Learning
PPTX
Beyond The Euclidean Distance: Creating effective visual codebooks using the ...
PPTX
Self Taught Learning
PDF
A Friendly Guide To Sparse Coding
PPTX
An Exemplar Model For Learning Object Classes
PPTX
Evaluation Of Color Descriptors For Object And Scene
PPTX
Spatially Coherent Latent Topic Model For Concurrent Object Segmentation and ...
PPTX
About Python
Book Cover Recognition
Introduction to Machine Learning
Beyond The Euclidean Distance: Creating effective visual codebooks using the ...
Self Taught Learning
A Friendly Guide To Sparse Coding
An Exemplar Model For Learning Object Classes
Evaluation Of Color Descriptors For Object And Scene
Spatially Coherent Latent Topic Model For Concurrent Object Segmentation and ...
About Python

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
Computing-Curriculum for Schools in Ghana
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
master seminar digital applications in india
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Pre independence Education in Inndia.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Institutional Correction lecture only . . .
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Sports Quiz easy sports quiz sports quiz
Cell Structure & Organelles in detailed.
Computing-Curriculum for Schools in Ghana
Supply Chain Operations Speaking Notes -ICLT Program
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Microbial disease of the cardiovascular and lymphatic systems
master seminar digital applications in india
PPH.pptx obstetrics and gynecology in nursing
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
VCE English Exam - Section C Student Revision Booklet
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pharma ospi slides which help in ospi learning
Renaissance Architecture: A Journey from Faith to Humanism
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Pre independence Education in Inndia.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Cell Types and Its function , kingdom of life
Institutional Correction lecture only . . .
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Sports Quiz easy sports quiz sports quiz

Image Classification And Support Vector Machine

  • 1. Image Classification and Support Vector MachineShao-Chuan WangCITI, Academia Sinica1
  • 2. Outline (1/2)Quick Review of SVMIntuitionFunctional margin and geometric marginOptimal margin classifierGeneralized Lagrangian multiplier methodsLagrangian dualityKernel and feature mappingSoft Margin ( l1 regularization)2
  • 3. Outline (2/2)Some basis about Learning theoryBias/variance tradeoff (underfitting vs overfitting)Chernoff bound and VC dimensionModel selectionCross validationDimension ReductionMulticlass SVMOne against oneOne against allImage Classification by SVMProcessResults3
  • 4. Intuition: MarginsFunctional MarginGeometric MarginWe feel more confident when functional margin is largerNote that scaling on w, b won’t change the plane.4Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 5. Maximize marginsOptimization problem: maximize minimal geometric margin under constraints.Introduce scaling factor such that5Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 6. Lagrange dualityPrimal optimization problem:Generalized LagrangianPrimal optimization problem (equivalent form)Dual optimization problem:6Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 7. Dual ProblemThe necessary conditions that equality holds:f, giare convex, and hi are affine.KKT conditions.7Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 8. Optimal margin classifiersIts LagrangianIts dual problem8Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 9. Kernel and feature mappingKernel:Positive semi-definiteSymmetricFor example:Loose Intuition“similarity” between features9Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 10. Soft Margin (L1 regularization)C = ∞ leads to hard margin SVM, Rychetsky (2001)10Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 11. Why doesn’t my model fit well on test data ?11
  • 12. Some basis about Learning theoryBias/variance tradeoffunderfitting (high bias) (high variance) overfittingTraining Error = Generalization Error =12Andrew Ng. Part V Support Vector Machines. CS229 Lecture Notes (2008).
  • 13. Bias/variance tradeoffT. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning. Springer series in statistics. Springer, New York, 2001.13
  • 14. Is training error a good estimator of generalization error?14
  • 15. Chernoff bound (|H|=finite)Lemma: Assume Z1, Z2, …, Zmare drawn iid from Bernoulli(φ), and and let γ > 0 be fixed. Then, based on this lemma, one can find, with probability 1-δ(k = # of hypotheses)15Andrew Ng. Part VI Learning Theory. CS229 Lecture Notes (2008).
  • 16. Chernoff bound (|H|=infinite)VC Dimension d : The size of largest set that H can shatter.e.g. H = linear classifiersin 2-DVC(H) = 3With probability at least 1-δ,16Andrew Ng. Part VI Learning Theory. CS229 Lecture Notes (2008).
  • 17. Model SelectionCross Validation: Estimator of generalization errorK-fold: train on k-1 pieces, test on the remaining (here we will get one test error estimation). Average k test error estimations, say, 2%. Then 2% is the estimation of generalization error for this machine learner.Leave-one-out cross validation (m-fold, m = training sample size)traintrainvalidatetraintraintrain17
  • 18. Model SelectionLoop possible parameters:Pick one set of parameter, e.g. C = 2.0Do cross validation, get a error estimationPick the Cbest (with minimal error estimation) as the parameter18
  • 19. Dimensionality ReductionWhich features are more “important”?Wrapper model feature selectionForward/backward search: add/remove a feature at a time, then evaluate the model with the new feature set.Filter feature selectionCompute score S(i) that measures how informative xi is about the class label yS(i) can be correlation Corr(x_i, y), or mutual information MI(x_i, y), etc.Principal Component Analysis (PCA)Vector Quantization (VQ)19
  • 20. Multiclass SVMOne against oneThere are binary SVMs. (1v2, 1v3, …)To predict, each SVM can vote between 2 classes.One against allThere are k binary SVMs. (1 v rest, 2 v rest, …)To predict, evaluate , pick the largest.Multiclass SVM by solving ONE optimization problemK = 135321123456K = 3poll Crammer, K., & Singer, Y. (2001). On the algorithmic implementation of multiclass kernel-based vector machines. JMLR, 2, 265-292.20
  • 21. Image Classification by SVMProcessK = 61/4 3/41 0:49 1:25 …1 0:49 1:25 …: :2 0:49 1:25 …:Test DataAccuracy21
  • 22. Image Classification by SVMResultsRun Multi-class SVM 100 times for both (linear/Gaussian).Accuracy Histogram22
  • 23. Image Classification by SVMIf we throw object data that the machine never saw before.23
  • 24. ~ Thank You ~Shao-Chuan WangCITI, Academia Sinica24