Kernels and the Kernel Trick. Machine Learning Fall 2017
|
|
- Reynold Bell
- 5 years ago
- Views:
Transcription
1 Kernels and the Kernel Trick Machine Learning Fall
2 Support vector machines Training by maximizing margin The SVM objective Solving the SVM optimization problem Support vectors, duals and kernels 2
3 Support vector machines Training by maximizing margin The SVM objective Solving the SVM optimization problem Support vectors, duals and kernels 3
4 This lecture 1. Support vectors 2. Kernels 3. The kernel trick 4. Properties of kernels 5. Another example of the kernel trick 4
5 This lecture 1. Support vectors 2. Kernels 3. The kernel trick 4. Properties of kernels 5. Another example of the kernel trick 5
6 So far we have seen Support vector machines Hinge loss and optimizing the regularized loss More broadly, different algorithms for learning linear classifiers 6
7 So far we have seen Support vector machines Hinge loss and optimizing the regularized loss More broadly, different algorithms for learning linear classifiers What about non-linear models? 7
8 One way to learn non-linear models Explicitly introduce non-linearity into the feature space If the true separator is quadratic 8
9 One way to learn non-linear models Explicitly introduce non-linearity into the feature space If the true separator is quadratic Transform all input points as 9
10 One way to learn non-linear models Explicitly introduce non-linearity into the feature space If the true separator is quadratic Transform all input points as Now, we can try to find a weight vector in this higher dimensional space That is, predict using w T Á(x 1, x 2 ) b 10
11 SVM: Primals and duals The SVM objective This is called the primal form of the objective This can be converted to its dual form, which will let us prove a very useful property 11
12 SVM: Primals and duals The SVM objective This is called the primal form of the objective This can be converted to its dual form, which will let us prove a very useful property Another optimization problem Has the property that max Dual = min Primal 12
13 Support vector machines Let w be the minimizer of the SVM problem for some dataset with m examples: {(x i, y i )} Then, for i = 1 m, there exist i 0 such that the optimum w can be written as 13
14 Support vector machines Let w be the minimizer of the SVM problem for some dataset with m examples: {(x i, y i )} Then, for i = 1 m, there exist i 0 such that the optimum w can be written as Furthermore, All points outside the margin 14
15 Support vector machines Let w be the minimizer of the SVM problem for some dataset with m examples: {(x i, y i )} Then, for i = 1 m, there exist i 0 such that the optimum w can be written as Furthermore, All points on the wrong side of the margin 15
16 Support vector machines Let w be the minimizer of the SVM problem for some dataset with m examples: {(x i, y i )} Then, for i = 1 m, there exist i 0 such that the optimum w can be written as Furthermore, All points on the margin 16
17 Support vectors The weight vector is completely defined by training examples whose i s are not zero These examples are called the support vectors 17
18 This lecture ü Support vectors 2. Kernels 3. The kernel trick 4. Properties of kernels 5. Another example of the kernel trick 18
19 Predicting with linear classifiers Prediction = and That is, we just showed that We only need to compute dot products between training examples and the new example x 19
20 Predicting with linear classifiers Prediction = and That is, we just showed that We only need to compute dot products between training examples and the new example x 20
21 Predicting with linear classifiers Prediction = and That is, we just showed that We only need to compute dot products between training examples and the new example x 21
22 Predicting with linear classifiers Prediction = and That is, we just showed that We only need to compute dot products between training examples and the new example x This is true even if we map examples to a high dimensional space 22
23 Predicting with linear classifiers Prediction = and That is, we just showed that That is we only need to compute dot products between training examples and the new example x This is true even if we map examples to a high dimensional space 23
24 Dot products in high dimensional spaces Let us define a dot product in the high dimensional space So prediction with this high dimensional lifting map is because 24
25 Dot products in high dimensional spaces Let us define a dot product in the high dimensional space So prediction with this high dimensional lifting map is because 25
26 Dot products in high dimensional spaces Let us define a dot product in the high dimensional space So prediction with this high dimensional lifting map is because 26
27 Kernel based methods Predict using What does this new formulation give us? If we have to compute Á every time anyway, we gain nothing If we can compute the value of K without explicitly writing the blown up representation, then we will have a computational advantage 27
28 Kernel based methods Predict using What does this new formulation give us? If we have to compute Á every time anyway, we gain nothing If we can compute the value of K without explicitly writing the blown up representation, then we will have a computational advantage. 28
29 This lecture ü Support vectors ü Kernels 3. The kernel trick 4. Properties of kernels 5. Another example of the kernel trick 29
30 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] 30
31 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] All degree zero terms 31
32 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] All degree zero terms All degree one terms 32
33 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] All degree zero terms All degree one terms All degree two terms 33
34 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] All degree zero terms All degree one terms All degree two terms and compute the dot product A = Á(x) T Á (z) [takes time ] 34
35 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] and compute the dot product A = Á(x) T Á (z) [takes time ] Instead, in the original space, compute Theorem: A = B (Coefficients do not really matter) 35
36 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] and compute the dot product A = Á(x) T Á (z) [takes time ] Instead, in the original space, compute Theorem: A = B (Coefficients do not really matter) 36
37 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] and compute the dot product A = Á(x) T Á (z) [takes time ] Instead, in the original space, compute Theorem: A = B (Coefficients do not really matter) 37
38 Example: Polynomial Kernel Given two examples x and z we want to map them to a high dimensional space [for example, quadratic] and compute the dot product A = Á(x) T Á (z) [takes time ] Instead, in the original space, compute Claim: A = B (Coefficients do not really matter) 38
39 Example: Two dimensions, quadratic kernel A = Á(x) T Á (z) 39
40 The Kernel Trick Suppose we wish to compute K(x, z) = Á(x) T Á (z) Here Á maps x and z to a high dimensional space The Kernel Trick: Save time/space by computing the value of K(x, z) by performing operations in the original space (without a feature transformation!) 40
41 Computing dot products efficiently Kernel Trick: You want to work with degree 2 polynomial features, Á(x). Then, your dot product will be operate using vectors in a space of dimensionality n(n+1)/2. The kernel trick allows you to save time/space and compute dot products in an n dimensional space. (Not just for degree 2 polynomials) Can we use any function K(.,.)? No! A function K(x,z) is a valid kernel if it corresponds to an inner product in some (perhaps infinite dimensional) feature space. General condition: construct the Gram matrix {K(x i,z j )}; check that it s positive semi definite 41
42 This lecture ü Support vectors ü Kernels ü The kernel trick 4. Properties of kernels 5. Another example of the kernel trick 42
43 Which functions are kernels? Kernel Trick: You want to work with degree 2 polynomial features, Á(x). Then, your dot product will be operate using vectors in a space of dimensionality n(n+1)/2. The kernel trick allows you to save time/space and compute dot products in an n dimensional space. (Not just for degree 2 polynomials) Can we use any function K(.,.)? No! A function K(x,z) is a valid kernel if it corresponds to an inner product in some (perhaps infinite dimensional) feature space. General condition: construct the Gram matrix {K(x i,z j )}; check that it s positive semi definite 43
44 Which functions are kernels? Kernel Trick: You want to work with degree 2 polynomial features, Á(x). Then, your dot product will be operate using vectors in a space of dimensionality n(n+1)/2. The kernel trick allows you to save time/space and compute dot products in an n dimensional space. (Not just for degree 2 polynomials) Can we use any function K(.,.)? No! A function K(x,z) is a valid kernel if it corresponds to an inner product in some (perhaps infinite dimensional) feature space. General condition: construct the Gram matrix {K(x i,z j )}; check that it s positive semi definite 44
45 Which functions are kernels? Kernel Trick: You want to work with degree 2 polynomial features, Á(x). Then, your dot product will be operate using vectors in a space of dimensionality n(n+1)/2. The kernel trick allows you to save time/space and compute dot products in an n dimensional space. (Not just for degree 2 polynomials) Can we use any function K(.,.)? No! A function K(x,z) is a valid kernel if it corresponds to an inner product in some (perhaps infinite dimensional) feature space. General condition: construct the Gram matrix {K(x i,z j )}; check that it s positive semi definite 45
46 Reminder: Positive semi-definite matrices A symmetric matrix M is positive semi-definite if it is For any vector non-zero z, we have z T Mz 0 (A useful property characterizing many interesting mathematical objects) 46
47 The Kernel Matrix The Gram matrix of a set of n vectors S = {x 1 x n } is the n n matrix G with G ij = x it x j The kernel matrix is the Gram matrix of {φ(x 1 ),,φ(x n )} (size depends on the # of examples, not dimensionality) Showing that a function K is a valid kernel Direct approach: If you have the φ(x i ), you have the Gram matrix (and it s easy to see that it will be positive semi-definite). Why? Indirect: If you have the Kernel, write down the Kernel matrix K ij, and show that it is a legitimate kernel, without an explicit construction of φ(x i ) 47
48 The Kernel Matrix The Gram matrix of a set of n vectors S = {x 1 x n } is the n n matrix G with G ij = x it x j The kernel matrix is the Gram matrix of {φ(x 1 ),,φ(x n )} (size depends on the # of examples, not dimensionality) Showing that a function K is a valid kernel Direct approach: If you have the φ(x i ), you have the Gram matrix (and it s easy to see that it will be positive semi-definite). Why? Indirect: If you have the Kernel, write down the Kernel matrix K ij, and show that it is a legitimate kernel, without an explicit construction of φ(x i ) 48
49 Mercer s condition Let K(x, z) be a function that maps two n dimensional vectors to a real number K is a valid kernel if for every finite set {x 1, x 2,! }, for any choice of real valued c 1, c 2,!, we have 49
50 Polynomial kernels Linear kernel: k(x, z) = x T z Polynomial kernel of degree d: k(x, z) = (x T z) d only dth-order interactions Polynomial kernel up to degree d: k(x, z) = (x T z + c) d (c>0) all interactions of order d or lower 50
51 Gaussian Kernel (or the radial basis function kernel) (x z) 2 : squared Euclidean distance between x and z c = σ 2 : a free parameter very small c: K identity matrix (every item is different) very large c: K unit matrix (all items are the same) k(x, z) 1 when x, z close k(x, z) 0 when x, z dissimilar 51
52 Gaussian Kernel (or the radial basis function kernel) (x z) 2 : squared Euclidean distance between x and z c = σ 2 : a free parameter very small c: K identity matrix (every item is different) very large c: K unit matrix (all items are the same) k(x, z) 1 when x, z close k(x, z) 0 when x, z dissimilar Exercises: 1. Prove that this is a kernel. 2. What is the blown up feature space for this kernel? 52
53 Constructing New Kernels You can construct new kernels k (x, x ) from existing ones: Multiplying k(x, x ) by a constant c ck(x, x ) Multiplying k(x, x ) by a function f applied to x and x f(x)k(x, x )f(x ) Applying a polynomial (with non-negative coefficients) to k(x, x ) P( k(x, x ) ) with P(z) = i a i z i and a i 0 Exponentiating k(x, x ) exp(k(x, x )) 53
54 Constructing New Kernels (2) You can construct k (x, x ) from k 1 (x, x ), k 2 (x, x ) by: Adding k 1 (x, x ) and k 2 (x, x ): k 1 (x, x ) + k 2 (x, x ) Multiplying k 1 (x, x ) and k 2 (x, x ): k 1 (x, x )k 2 (x, x ) Also: If φ(x)2 R m and k m (z, z ) a valid kernel in R m, k(x, x ) = k m (φ(x), φ(x )) is also a valid kernel If A is a symmetric positive semi-definite matrix, k(x, x ) = xax is also a valid kernel 54
55 Constructing New Kernels (2) You can construct k (x, x ) from k 1 (x, x ), k 2 (x, x ) by: Adding k 1 (x, x ) and k 2 (x, x ): k 1 (x, x ) + k 2 (x, x ) Multiplying k 1 (x, x ) and k 2 (x, x ): k 1 (x, x )k 2 (x, x ) Also: If φ(x)2 R m and k m (z, z ) a valid kernel in R m, k(x, x ) = k m (φ(x), φ(x )) is also a valid kernel If A is a symmetric positive semi-definite matrix, k(x, x ) = xax is also a valid kernel 55
56 Kernel Trick: An example Let the blown up feature space represent the space of all 3 n conjunctions. Then, where same(x,z) is the number of features that have the same value for both x and z Example: Take n=3; x=(001), z=(011), we have conjunctions of size 0,1,2,3 Proof: let m=same(x, z); construct surviving conjunctions by 1. choosing to include one of these k literals with the right polarity in the conjunctions, or 2. choosing to not include it at all. Conjunctions with literals outside this set disappear. 56
57 This lecture ü Support vectors ü Kernels ü The kernel trick ü Properties of kernels 5. Another example of the kernel trick 57
58 Kernel Trick: An example Let the blown up feature space represent the space of all 3 n conjunctions. Then, where same(x,z) is the number of features that have the same value for both x and z Example: Take n=3; x=(001), z=(011), we have conjunctions of size 0,1,2,3 Proof: let m=same(x, z); construct surviving conjunctions by 1. choosing to include one of these k literals with the right polarity in the conjunctions, or 2. choosing to not include it at all. Conjunctions with literals outside this set disappear. 58
59 Kernel Trick: An example Let the blown up feature space represent the space of all 3 n conjunctions. Then, where same(x,z) is the number of features that have the same value for both x and z Example: Take n=3; x=(001), z=(011), we have conjunctions of size 0,1,2,3 Proof: let m=same(x, z); construct surviving conjunctions by 1. choosing to include one of these k literals with the right polarity in the conjunctions, or 2. choosing to not include it at all. Conjunctions with literals outside this set disappear. 59
60 Kernel Trick: An example Let the blown up feature space represent the space of all 3 n conjunctions. Then, where same(x,z) is the number of features that have the same value for both x and z Example: Take n=3; x=(001), z=(011), we have conjunctions of size 0,1,2,3 Proof: let m=same(x, z); construct surviving conjunctions by 1. choosing to include one of these k literals with the right polarity in the conjunctions, or 2. choosing to not include it at all. Conjunctions with literals outside this set disappear. 60
61 Kernel Trick: An example Let the blown up feature space represent the space of all 3 n conjunctions. Then, where same(x,z) is the number of features that have the same value for both x and z Example: Take n=3; x=(001), z=(011), we have conjunctions of size 0,1,2,3 Proof: let m=same(x, z); construct surviving conjunctions by 1. choosing to include one of these k literals with the right polarity in the conjunctions, or 2. choosing to not include it at all. Conjunctions with literals outside this set disappear. 61
62 Kernel Trick: An example Let the blown up feature space represent the space of all 3 n conjunctions. Then, where same(x,z) is the number of features that have the same value for both x and z Example: Take n=3; x=(001), z=(011), we have conjunctions of size 0,1,2,3 Proof: let m=same(x, z); construct surviving conjunctions by 1. choosing to include one of these k literals with the right polarity in the conjunctions, or 2. choosing to not include it at all. Conjunctions with literals outside this set disappear. 62
63 Exercises 1. Show that this argument works for a specific example Take X={x 1, x 2, x 3, x 4 } Á(x) = The space of all 3 n conjunctions ; Á(x) = 81 Consider x=(1100), z=(1101) Write Á(x), Á(z), the representation of x, z in the Á space Compute Á(x) T Á(z) Show that K(x,z) =Á(x) T Á(z)= å i Á i (z) Á i (x) = 2 same(x,z) = 8 2. Try to develop another kernel, e.g., where the space of all conjunctions of size 3 (exactly) 63
64 Summary: Kernel trick To make the final prediction, we are computing dot products The kernel trick is a computational trick to compute dot products in higher dimensional spaces This is applicable not just to SVMs. The same idea can be extended to Perceptron too: the Kernel Perceptron Important: All the bounds we have seen (eg: Perceptron bound, etc) depend on the underlying dimensionality By moving to a higher dimensional space, we are incurring a penalty on sample complexity 64
Online Learning With Kernel
CS 446 Machine Learning Fall 2016 SEP 27, 2016 Online Learning With Kernel Professor: Dan Roth Scribe: Ben Zhou, C. Cervantes Overview Stochastic Gradient Descent Algorithms Regularization Algorithm Issues
More informationSupport Vector Machine (SVM) & Kernel CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2012
Support Vector Machine (SVM) & Kernel CE-717: Machine Learning Sharif University of Technology M. Soleymani Fall 2012 Linear classifier Which classifier? x 2 x 1 2 Linear classifier Margin concept x 2
More informationMachine Learning and Data Mining. Support Vector Machines. Kalev Kask
Machine Learning and Data Mining Support Vector Machines Kalev Kask Linear classifiers Which decision boundary is better? Both have zero training error (perfect training accuracy) But, one of them seems
More informationPerceptron Revisited: Linear Separators. Support Vector Machines
Support Vector Machines Perceptron Revisited: Linear Separators Binary classification can be viewed as the task of separating classes in feature space: w T x + b > 0 w T x + b = 0 w T x + b < 0 Department
More informationSupport Vector Machine (SVM) and Kernel Methods
Support Vector Machine (SVM) and Kernel Methods CE-717: Machine Learning Sharif University of Technology Fall 2014 Soleymani Outline Margin concept Hard-Margin SVM Soft-Margin SVM Dual Problems of Hard-Margin
More informationSVMs, Duality and the Kernel Trick
SVMs, Duality and the Kernel Trick Machine Learning 10701/15781 Carlos Guestrin Carnegie Mellon University February 26 th, 2007 2005-2007 Carlos Guestrin 1 SVMs reminder 2005-2007 Carlos Guestrin 2 Today
More informationMachine Learning. Support Vector Machines. Manfred Huber
Machine Learning Support Vector Machines Manfred Huber 2015 1 Support Vector Machines Both logistic regression and linear discriminant analysis learn a linear discriminant function to separate the data
More informationKernel Methods. Foundations of Data Analysis. Torsten Möller. Möller/Mori 1
Kernel Methods Foundations of Data Analysis Torsten Möller Möller/Mori 1 Reading Chapter 6 of Pattern Recognition and Machine Learning by Bishop Chapter 12 of The Elements of Statistical Learning by Hastie,
More informationSupport Vector Machine (SVM) and Kernel Methods
Support Vector Machine (SVM) and Kernel Methods CE-717: Machine Learning Sharif University of Technology Fall 2015 Soleymani Outline Margin concept Hard-Margin SVM Soft-Margin SVM Dual Problems of Hard-Margin
More informationReview: Support vector machines. Machine learning techniques and image analysis
Review: Support vector machines Review: Support vector machines Margin optimization min (w,w 0 ) 1 2 w 2 subject to y i (w 0 + w T x i ) 1 0, i = 1,..., n. Review: Support vector machines Margin optimization
More informationSVMs: nonlinearity through kernels
Non-separable data e-8. Support Vector Machines 8.. The Optimal Hyperplane Consider the following two datasets: SVMs: nonlinearity through kernels ER Chapter 3.4, e-8 (a) Few noisy data. (b) Nonlinearly
More informationCIS 520: Machine Learning Oct 09, Kernel Methods
CIS 520: Machine Learning Oct 09, 207 Kernel Methods Lecturer: Shivani Agarwal Disclaimer: These notes are designed to be a supplement to the lecture They may or may not cover all the material discussed
More informationKernel Methods. Barnabás Póczos
Kernel Methods Barnabás Póczos Outline Quick Introduction Feature space Perceptron in the feature space Kernels Mercer s theorem Finite domain Arbitrary domain Kernel families Constructing new kernels
More informationLecture 10: A brief introduction to Support Vector Machine
Lecture 10: A brief introduction to Support Vector Machine Advanced Applied Multivariate Analysis STAT 2221, Fall 2013 Sungkyu Jung Department of Statistics, University of Pittsburgh Xingye Qiao Department
More informationSUPPORT VECTOR MACHINE
SUPPORT VECTOR MACHINE Mainly based on https://nlp.stanford.edu/ir-book/pdf/15svm.pdf 1 Overview SVM is a huge topic Integration of MMDS, IIR, and Andrew Moore s slides here Our foci: Geometric intuition
More informationSupport Vector Machine (SVM) and Kernel Methods
Support Vector Machine (SVM) and Kernel Methods CE-717: Machine Learning Sharif University of Technology Fall 2016 Soleymani Outline Margin concept Hard-Margin SVM Soft-Margin SVM Dual Problems of Hard-Margin
More information(Kernels +) Support Vector Machines
(Kernels +) Support Vector Machines Machine Learning Torsten Möller Reading Chapter 5 of Machine Learning An Algorithmic Perspective by Marsland Chapter 6+7 of Pattern Recognition and Machine Learning
More informationMachine Learning. Kernels. Fall (Kernels, Kernelized Perceptron and SVM) Professor Liang Huang. (Chap. 12 of CIML)
Machine Learning Fall 2017 Kernels (Kernels, Kernelized Perceptron and SVM) Professor Liang Huang (Chap. 12 of CIML) Nonlinear Features x4: -1 x1: +1 x3: +1 x2: -1 Concatenated (combined) features XOR:
More informationKernel Methods. Charles Elkan October 17, 2007
Kernel Methods Charles Elkan elkan@cs.ucsd.edu October 17, 2007 Remember the xor example of a classification problem that is not linearly separable. If we map every example into a new representation, then
More informationSupport Vector Machine (continued)
Support Vector Machine continued) Overlapping class distribution: In practice the class-conditional distributions may overlap, so that the training data points are no longer linearly separable. We need
More informationMark your answers ON THE EXAM ITSELF. If you are not sure of your answer you may wish to provide a brief explanation.
CS 189 Spring 2015 Introduction to Machine Learning Midterm You have 80 minutes for the exam. The exam is closed book, closed notes except your one-page crib sheet. No calculators or electronic items.
More informationJeff Howbert Introduction to Machine Learning Winter
Classification / Regression Support Vector Machines Jeff Howbert Introduction to Machine Learning Winter 2012 1 Topics SVM classifiers for linearly separable classes SVM classifiers for non-linearly separable
More informationKernel Machines. Pradeep Ravikumar Co-instructor: Manuela Veloso. Machine Learning
Kernel Machines Pradeep Ravikumar Co-instructor: Manuela Veloso Machine Learning 10-701 SVM linearly separable case n training points (x 1,, x n ) d features x j is a d-dimensional vector Primal problem:
More informationOutline. Basic concepts: SVM and kernels SVM primal/dual problems. Chih-Jen Lin (National Taiwan Univ.) 1 / 22
Outline Basic concepts: SVM and kernels SVM primal/dual problems Chih-Jen Lin (National Taiwan Univ.) 1 / 22 Outline Basic concepts: SVM and kernels Basic concepts: SVM and kernels SVM primal/dual problems
More informationAbout this class. Maximizing the Margin. Maximum margin classifiers. Picture of large and small margin hyperplanes
About this class Maximum margin classifiers SVMs: geometric derivation of the primal problem Statement of the dual problem The kernel trick SVMs as the solution to a regularization problem Maximizing the
More informationSupport Vector Machines: Maximum Margin Classifiers
Support Vector Machines: Maximum Margin Classifiers Machine Learning and Pattern Recognition: September 16, 2008 Piotr Mirowski Based on slides by Sumit Chopra and Fu-Jie Huang 1 Outline What is behind
More informationOutline. Motivation. Mapping the input space to the feature space Calculating the dot product in the feature space
to The The A s s in to Fabio A. González Ph.D. Depto. de Ing. de Sistemas e Industrial Universidad Nacional de Colombia, Bogotá April 2, 2009 to The The A s s in 1 Motivation Outline 2 The Mapping the
More informationComputer Vision Group Prof. Daniel Cremers. 2. Regression (cont.)
Prof. Daniel Cremers 2. Regression (cont.) Regression with MLE (Rep.) Assume that y is affected by Gaussian noise : t = f(x, w)+ where Thus, we have p(t x, w, )=N (t; f(x, w), 2 ) 2 Maximum A-Posteriori
More informationLinear & nonlinear classifiers
Linear & nonlinear classifiers Machine Learning Hamid Beigy Sharif University of Technology Fall 1394 Hamid Beigy (Sharif University of Technology) Linear & nonlinear classifiers Fall 1394 1 / 34 Table
More informationStat542 (F11) Statistical Learning. First consider the scenario where the two classes of points are separable.
Linear SVM (separable case) First consider the scenario where the two classes of points are separable. It s desirable to have the width (called margin) between the two dashed lines to be large, i.e., have
More informationEach new feature uses a pair of the original features. Problem: Mapping usually leads to the number of features blow up!
Feature Mapping Consider the following mapping φ for an example x = {x 1,...,x D } φ : x {x1,x 2 2,...,x 2 D,,x 2 1 x 2,x 1 x 2,...,x 1 x D,...,x D 1 x D } It s an example of a quadratic mapping Each new
More informationSupport Vector Machines
Two SVM tutorials linked in class website (please, read both): High-level presentation with applications (Hearst 1998) Detailed tutorial (Burges 1998) Support Vector Machines Machine Learning 10701/15781
More informationSupport Vector Machines (SVM) in bioinformatics. Day 1: Introduction to SVM
1 Support Vector Machines (SVM) in bioinformatics Day 1: Introduction to SVM Jean-Philippe Vert Bioinformatics Center, Kyoto University, Japan Jean-Philippe.Vert@mines.org Human Genome Center, University
More informationSupport Vector Machines. Introduction to Data Mining, 2 nd Edition by Tan, Steinbach, Karpatne, Kumar
Data Mining Support Vector Machines Introduction to Data Mining, 2 nd Edition by Tan, Steinbach, Karpatne, Kumar 02/03/2018 Introduction to Data Mining 1 Support Vector Machines Find a linear hyperplane
More informationSupport Vector Machines and Kernel Methods
2018 CS420 Machine Learning, Lecture 3 Hangout from Prof. Andrew Ng. http://cs229.stanford.edu/notes/cs229-notes3.pdf Support Vector Machines and Kernel Methods Weinan Zhang Shanghai Jiao Tong University
More informationSupport Vector Machines
EE 17/7AT: Optimization Models in Engineering Section 11/1 - April 014 Support Vector Machines Lecturer: Arturo Fernandez Scribe: Arturo Fernandez 1 Support Vector Machines Revisited 1.1 Strictly) Separable
More informationStatistical Machine Learning from Data
Samy Bengio Statistical Machine Learning from Data 1 Statistical Machine Learning from Data Support Vector Machines Samy Bengio IDIAP Research Institute, Martigny, Switzerland, and Ecole Polytechnique
More informationIntroduction to Support Vector Machines
Introduction to Support Vector Machines Shivani Agarwal Support Vector Machines (SVMs) Algorithm for learning linear classifiers Motivated by idea of maximizing margin Efficient extension to non-linear
More informationLinear & nonlinear classifiers
Linear & nonlinear classifiers Machine Learning Hamid Beigy Sharif University of Technology Fall 1396 Hamid Beigy (Sharif University of Technology) Linear & nonlinear classifiers Fall 1396 1 / 44 Table
More informationCS145: INTRODUCTION TO DATA MINING
CS145: INTRODUCTION TO DATA MINING 5: Vector Data: Support Vector Machine Instructor: Yizhou Sun yzsun@cs.ucla.edu October 18, 2017 Homework 1 Announcements Due end of the day of this Thursday (11:59pm)
More informationData Mining. Linear & nonlinear classifiers. Hamid Beigy. Sharif University of Technology. Fall 1396
Data Mining Linear & nonlinear classifiers Hamid Beigy Sharif University of Technology Fall 1396 Hamid Beigy (Sharif University of Technology) Data Mining Fall 1396 1 / 31 Table of contents 1 Introduction
More information10/05/2016. Computational Methods for Data Analysis. Massimo Poesio SUPPORT VECTOR MACHINES. Support Vector Machines Linear classifiers
Computational Methods for Data Analysis Massimo Poesio SUPPORT VECTOR MACHINES Support Vector Machines Linear classifiers 1 Linear Classifiers denotes +1 denotes -1 w x + b>0 f(x,w,b) = sign(w x + b) How
More informationIndirect Rule Learning: Support Vector Machines. Donglin Zeng, Department of Biostatistics, University of North Carolina
Indirect Rule Learning: Support Vector Machines Indirect learning: loss optimization It doesn t estimate the prediction rule f (x) directly, since most loss functions do not have explicit optimizers. Indirection
More informationKernel Methods and Support Vector Machines
Kernel Methods and Support Vector Machines Oliver Schulte - CMPT 726 Bishop PRML Ch. 6 Support Vector Machines Defining Characteristics Like logistic regression, good for continuous input features, discrete
More informationSupport Vector Machines
Wien, June, 2010 Paul Hofmarcher, Stefan Theussl, WU Wien Hofmarcher/Theussl SVM 1/21 Linear Separable Separating Hyperplanes Non-Linear Separable Soft-Margin Hyperplanes Hofmarcher/Theussl SVM 2/21 (SVM)
More informationSupport Vector Machine
Support Vector Machine Kernel: Kernel is defined as a function returning the inner product between the images of the two arguments k(x 1, x 2 ) = ϕ(x 1 ), ϕ(x 2 ) k(x 1, x 2 ) = k(x 2, x 1 ) modularity-
More informationLinear, threshold units. Linear Discriminant Functions and Support Vector Machines. Biometrics CSE 190 Lecture 11. X i : inputs W i : weights
Linear Discriminant Functions and Support Vector Machines Linear, threshold units CSE19, Winter 11 Biometrics CSE 19 Lecture 11 1 X i : inputs W i : weights θ : threshold 3 4 5 1 6 7 Courtesy of University
More informationML (cont.): SUPPORT VECTOR MACHINES
ML (cont.): SUPPORT VECTOR MACHINES CS540 Bryan R Gibson University of Wisconsin-Madison Slides adapted from those used by Prof. Jerry Zhu, CS540-1 1 / 40 Support Vector Machines (SVMs) The No-Math Version
More informationLecture 9: Large Margin Classifiers. Linear Support Vector Machines
Lecture 9: Large Margin Classifiers. Linear Support Vector Machines Perceptrons Definition Perceptron learning rule Convergence Margin & max margin classifiers (Linear) support vector machines Formulation
More informationKernelized Perceptron Support Vector Machines
Kernelized Perceptron Support Vector Machines Emily Fox University of Washington February 13, 2017 What is the perceptron optimizing? 1 The perceptron algorithm [Rosenblatt 58, 62] Classification setting:
More informationSupport Vector Machines and Speaker Verification
1 Support Vector Machines and Speaker Verification David Cinciruk March 6, 2013 2 Table of Contents Review of Speaker Verification Introduction to Support Vector Machines Derivation of SVM Equations Soft
More informationPattern Recognition and Machine Learning. Perceptrons and Support Vector machines
Pattern Recognition and Machine Learning James L. Crowley ENSIMAG 3 - MMIS Fall Semester 2016 Lessons 6 10 Jan 2017 Outline Perceptrons and Support Vector machines Notation... 2 Perceptrons... 3 History...3
More informationTopics we covered. Machine Learning. Statistics. Optimization. Systems! Basics of probability Tail bounds Density Estimation Exponential Families
Midterm Review Topics we covered Machine Learning Optimization Basics of optimization Convexity Unconstrained: GD, SGD Constrained: Lagrange, KKT Duality Linear Methods Perceptrons Support Vector Machines
More informationSupport Vector Machines
Support Vector Machines INFO-4604, Applied Machine Learning University of Colorado Boulder September 28, 2017 Prof. Michael Paul Today Two important concepts: Margins Kernels Large Margin Classification
More informationKernel methods, kernel SVM and ridge regression
Kernel methods, kernel SVM and ridge regression Le Song Machine Learning II: Advanced Topics CSE 8803ML, Spring 2012 Collaborative Filtering 2 Collaborative Filtering R: rating matrix; U: user factor;
More informationSupport'Vector'Machines. Machine(Learning(Spring(2018 March(5(2018 Kasthuri Kannan
Support'Vector'Machines Machine(Learning(Spring(2018 March(5(2018 Kasthuri Kannan kasthuri.kannan@nyumc.org Overview Support Vector Machines for Classification Linear Discrimination Nonlinear Discrimination
More informationMulti-class SVMs. Lecture 17: Aykut Erdem April 2016 Hacettepe University
Multi-class SVMs Lecture 17: Aykut Erdem April 2016 Hacettepe University Administrative We will have a make-up lecture on Saturday April 23, 2016. Project progress reports are due April 21, 2016 2 days
More informationFoundation of Intelligent Systems, Part I. SVM s & Kernel Methods
Foundation of Intelligent Systems, Part I SVM s & Kernel Methods mcuturi@i.kyoto-u.ac.jp FIS - 2013 1 Support Vector Machines The linearly-separable case FIS - 2013 2 A criterion to select a linear classifier:
More informationMachine Learning Support Vector Machines. Prof. Matteo Matteucci
Machine Learning Support Vector Machines Prof. Matteo Matteucci Discriminative vs. Generative Approaches 2 o Generative approach: we derived the classifier from some generative hypothesis about the way
More information10-701/ Recitation : Kernels
10-701/15-781 Recitation : Kernels Manojit Nandi February 27, 2014 Outline Mathematical Theory Banach Space and Hilbert Spaces Kernels Commonly Used Kernels Kernel Theory One Weird Kernel Trick Representer
More informationMachine Learning : Support Vector Machines
Machine Learning Support Vector Machines 05/01/2014 Machine Learning : Support Vector Machines Linear Classifiers (recap) A building block for almost all a mapping, a partitioning of the input space into
More informationChapter 9. Support Vector Machine. Yongdai Kim Seoul National University
Chapter 9. Support Vector Machine Yongdai Kim Seoul National University 1. Introduction Support Vector Machine (SVM) is a classification method developed by Vapnik (1996). It is thought that SVM improved
More informationSupport Vector Machines
Support Vector Machines Support vector machines (SVMs) are one of the central concepts in all of machine learning. They are simply a combination of two ideas: linear classification via maximum (or optimal
More informationLinear vs Non-linear classifier. CS789: Machine Learning and Neural Network. Introduction
Linear vs Non-linear classifier CS789: Machine Learning and Neural Network Support Vector Machine Jakramate Bootkrajang Department of Computer Science Chiang Mai University Linear classifier is in the
More informationLearning From Data Lecture 25 The Kernel Trick
Learning From Data Lecture 25 The Kernel Trick Learning with only inner products The Kernel M. Magdon-Ismail CSCI 400/600 recap: Large Margin is Better Controling Overfitting Non-Separable Data 0.08 random
More informationCS798: Selected topics in Machine Learning
CS798: Selected topics in Machine Learning Support Vector Machine Jakramate Bootkrajang Department of Computer Science Chiang Mai University Jakramate Bootkrajang CS798: Selected topics in Machine Learning
More informationSupport vector machines Lecture 4
Support vector machines Lecture 4 David Sontag New York University Slides adapted from Luke Zettlemoyer, Vibhav Gogate, and Carlos Guestrin Q: What does the Perceptron mistake bound tell us? Theorem: The
More informationSupport Vector Machines: Kernels
Support Vector Machines: Kernels CS6780 Advanced Machine Learning Spring 2015 Thorsten Joachims Cornell University Reading: Murphy 14.1, 14.2, 14.4 Schoelkopf/Smola Chapter 7.4, 7.6, 7.8 Non-Linear Problems
More informationMehryar Mohri Foundations of Machine Learning Courant Institute of Mathematical Sciences Homework assignment 3 April 5, 2013 Due: April 19, 2013
Mehryar Mohri Foundations of Machine Learning Courant Institute of Mathematical Sciences Homework assignment 3 April 5, 2013 Due: April 19, 2013 A. Kernels 1. Let X be a finite set. Show that the kernel
More information18.9 SUPPORT VECTOR MACHINES
744 Chapter 8. Learning from Examples is the fact that each regression problem will be easier to solve, because it involves only the examples with nonzero weight the examples whose kernels overlap the
More informationLinear Classification and SVM. Dr. Xin Zhang
Linear Classification and SVM Dr. Xin Zhang Email: eexinzhang@scut.edu.cn What is linear classification? Classification is intrinsically non-linear It puts non-identical things in the same class, so a
More informationMax Margin-Classifier
Max Margin-Classifier Oliver Schulte - CMPT 726 Bishop PRML Ch. 7 Outline Maximum Margin Criterion Math Maximizing the Margin Non-Separable Data Kernels and Non-linear Mappings Where does the maximization
More informationSupport Vector Machines.
Support Vector Machines www.cs.wisc.edu/~dpage 1 Goals for the lecture you should understand the following concepts the margin slack variables the linear support vector machine nonlinear SVMs the kernel
More informationLMS Algorithm Summary
LMS Algorithm Summary Step size tradeoff Other Iterative Algorithms LMS algorithm with variable step size: w(k+1) = w(k) + µ(k)e(k)x(k) When step size µ(k) = µ/k algorithm converges almost surely to optimal
More information6.036 midterm review. Wednesday, March 18, 15
6.036 midterm review 1 Topics covered supervised learning labels available unsupervised learning no labels available semi-supervised learning some labels available - what algorithms have you learned that
More informationBasis Expansion and Nonlinear SVM. Kai Yu
Basis Expansion and Nonlinear SVM Kai Yu Linear Classifiers f(x) =w > x + b z(x) = sign(f(x)) Help to learn more general cases, e.g., nonlinear models 8/7/12 2 Nonlinear Classifiers via Basis Expansion
More informationEE613 Machine Learning for Engineers. Kernel methods Support Vector Machines. jean-marc odobez 2015
EE613 Machine Learning for Engineers Kernel methods Support Vector Machines jean-marc odobez 2015 overview Kernel methods introductions and main elements defining kernels Kernelization of k-nn, K-Means,
More informationApplied Machine Learning Annalisa Marsico
Applied Machine Learning Annalisa Marsico OWL RNA Bionformatics group Max Planck Institute for Molecular Genetics Free University of Berlin 29 April, SoSe 2015 Support Vector Machines (SVMs) 1. One of
More informationDan Roth 461C, 3401 Walnut
CIS 519/419 Applied Machine Learning www.seas.upenn.edu/~cis519 Dan Roth danroth@seas.upenn.edu http://www.cis.upenn.edu/~danroth/ 461C, 3401 Walnut Slides were created by Dan Roth (for CIS519/419 at Penn
More informationMidterm Review CS 7301: Advanced Machine Learning. Vibhav Gogate The University of Texas at Dallas
Midterm Review CS 7301: Advanced Machine Learning Vibhav Gogate The University of Texas at Dallas Supervised Learning Issues in supervised learning What makes learning hard Point Estimation: MLE vs Bayesian
More informationSVMs: Non-Separable Data, Convex Surrogate Loss, Multi-Class Classification, Kernels
SVMs: Non-Separable Data, Convex Surrogate Loss, Multi-Class Classification, Kernels Karl Stratos June 21, 2018 1 / 33 Tangent: Some Loose Ends in Logistic Regression Polynomial feature expansion in logistic
More informationNon-Bayesian Classifiers Part II: Linear Discriminants and Support Vector Machines
Non-Bayesian Classifiers Part II: Linear Discriminants and Support Vector Machines Selim Aksoy Department of Computer Engineering Bilkent University saksoy@cs.bilkent.edu.tr CS 551, Fall 2018 CS 551, Fall
More informationSupport Vector Machine & Its Applications
Support Vector Machine & Its Applications A portion (1/3) of the slides are taken from Prof. Andrew Moore s SVM tutorial at http://www.cs.cmu.edu/~awm/tutorials Mingyue Tan The University of British Columbia
More informationThe Representor Theorem, Kernels, and Hilbert Spaces
The Representor Theorem, Kernels, and Hilbert Spaces We will now work with infinite dimensional feature vectors and parameter vectors. The space l is defined to be the set of sequences f 1, f, f 3,...
More informationSupport Vector Machines Explained
December 23, 2008 Support Vector Machines Explained Tristan Fletcher www.cs.ucl.ac.uk/staff/t.fletcher/ Introduction This document has been written in an attempt to make the Support Vector Machines (SVM),
More informationSupport Vector Machines
Support Vector Machines Hypothesis Space variable size deterministic continuous parameters Learning Algorithm linear and quadratic programming eager batch SVMs combine three important ideas Apply optimization
More informationSupport Vector Machines
Support Vector Machines Reading: Ben-Hur & Weston, A User s Guide to Support Vector Machines (linked from class web page) Notation Assume a binary classification problem. Instances are represented by vector
More informationLecture 4 February 2
4-1 EECS 281B / STAT 241B: Advanced Topics in Statistical Learning Spring 29 Lecture 4 February 2 Lecturer: Martin Wainwright Scribe: Luqman Hodgkinson Note: These lecture notes are still rough, and have
More informationSupport Vector Machines. CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington
Support Vector Machines CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington 1 A Linearly Separable Problem Consider the binary classification
More informationLecture 10: Support Vector Machine and Large Margin Classifier
Lecture 10: Support Vector Machine and Large Margin Classifier Applied Multivariate Analysis Math 570, Fall 2014 Xingye Qiao Department of Mathematical Sciences Binghamton University E-mail: qiao@math.binghamton.edu
More informationCOMS 4721: Machine Learning for Data Science Lecture 10, 2/21/2017
COMS 4721: Machine Learning for Data Science Lecture 10, 2/21/2017 Prof. John Paisley Department of Electrical Engineering & Data Science Institute Columbia University FEATURE EXPANSIONS FEATURE EXPANSIONS
More informationNeural networks and support vector machines
Neural netorks and support vector machines Perceptron Input x 1 Weights 1 x 2 x 3... x D 2 3 D Output: sgn( x + b) Can incorporate bias as component of the eight vector by alays including a feature ith
More informationMidterm Review CS 6375: Machine Learning. Vibhav Gogate The University of Texas at Dallas
Midterm Review CS 6375: Machine Learning Vibhav Gogate The University of Texas at Dallas Machine Learning Supervised Learning Unsupervised Learning Reinforcement Learning Parametric Y Continuous Non-parametric
More information9.2 Support Vector Machines 159
9.2 Support Vector Machines 159 9.2.3 Kernel Methods We have all the tools together now to make an exciting step. Let us summarize our findings. We are interested in regularized estimation problems of
More informationDeviations from linear separability. Kernel methods. Basis expansion for quadratic boundaries. Adding new features Systematic deviation
Deviations from linear separability Kernel methods CSE 250B Noise Find a separator that minimizes a convex loss function related to the number of mistakes. e.g. SVM, logistic regression. Systematic deviation
More informationKaggle.
Administrivia Mini-project 2 due April 7, in class implement multi-class reductions, naive bayes, kernel perceptron, multi-class logistic regression and two layer neural networks training set: Project
More informationSupport Vector Machines
Support Vector Machines Some material on these is slides borrowed from Andrew Moore's excellent machine learning tutorials located at: http://www.cs.cmu.edu/~awm/tutorials/ Where Should We Draw the Line????
More informationMidterm. Introduction to Machine Learning. CS 189 Spring You have 1 hour 20 minutes for the exam.
CS 189 Spring 2013 Introduction to Machine Learning Midterm You have 1 hour 20 minutes for the exam. The exam is closed book, closed notes except your one-page crib sheet. Please use non-programmable calculators
More informationPattern Recognition 2018 Support Vector Machines
Pattern Recognition 2018 Support Vector Machines Ad Feelders Universiteit Utrecht Ad Feelders ( Universiteit Utrecht ) Pattern Recognition 1 / 48 Support Vector Machines Ad Feelders ( Universiteit Utrecht
More informationKernel methods CSE 250B
Kernel methods CSE 250B Deviations from linear separability Noise Find a separator that minimizes a convex loss function related to the number of mistakes. e.g. SVM, logistic regression. Deviations from
More information