Linear, threshold units. Linear Discriminant Functions and Support Vector Machines. Biometrics CSE 190 Lecture 11. X i : inputs W i : weights

Similar documents
Perceptron Revisited: Linear Separators. Support Vector Machines

Support'Vector'Machines. Machine(Learning(Spring(2018 March(5(2018 Kasthuri Kannan

Support Vector Machines II. CAP 5610: Machine Learning Instructor: Guo-Jun QI

SUPPORT VECTOR MACHINE

Support Vector Machine & Its Applications

CS145: INTRODUCTION TO DATA MINING

Linear Classification and SVM. Dr. Xin Zhang

Support Vector Machine (SVM) & Kernel CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2012

Jeff Howbert Introduction to Machine Learning Winter

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machines (SVM) in bioinformatics. Day 1: Introduction to SVM

Outline. Basic concepts: SVM and kernels SVM primal/dual problems. Chih-Jen Lin (National Taiwan Univ.) 1 / 22

Linear & nonlinear classifiers

Support Vector Machine (SVM) and Kernel Methods

Pattern Recognition 2018 Support Vector Machines

Support Vector Machines: Maximum Margin Classifiers

Support Vector Machines. CAP 5610: Machine Learning Instructor: Guo-Jun QI

Support Vector Machines Explained

Neural Networks. Prof. Dr. Rudolf Kruse. Computational Intelligence Group Faculty for Computer Science

10/05/2016. Computational Methods for Data Analysis. Massimo Poesio SUPPORT VECTOR MACHINES. Support Vector Machines Linear classifiers

Kernel Methods and Support Vector Machines

Support Vector Machines

Lecture 10: A brief introduction to Support Vector Machine

Introduction to SVM and RVM

Introduction to Support Vector Machines

Linear & nonlinear classifiers

Linear vs Non-linear classifier. CS789: Machine Learning and Neural Network. Introduction

Lecture 10: Support Vector Machine and Large Margin Classifier

ML (cont.): SUPPORT VECTOR MACHINES

Support Vector Machines

Support Vector Machines.

Statistical Pattern Recognition

Machine Learning and Data Mining. Support Vector Machines. Kalev Kask

Machine Learning. Support Vector Machines. Manfred Huber

Introduction to Support Vector Machines

FIND A FUNCTION TO CLASSIFY HIGH VALUE CUSTOMERS

CS6375: Machine Learning Gautam Kunapuli. Support Vector Machines

Support Vector Machine (continued)

CS249: ADVANCED DATA MINING

6.867 Machine learning

Linear classifiers selecting hyperplane maximizing separation margin between classes (large margin classifiers)

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Data Mining. Linear & nonlinear classifiers. Hamid Beigy. Sharif University of Technology. Fall 1396

(Kernels +) Support Vector Machines

Machine Learning Support Vector Machines. Prof. Matteo Matteucci

Support Vector Machine (SVM) and Kernel Methods

Lecture Support Vector Machine (SVM) Classifiers

Non-Bayesian Classifiers Part II: Linear Discriminants and Support Vector Machines

CSC 411 Lecture 17: Support Vector Machine

Introduction to Support Vector Machines

Lecture 9: Large Margin Classifiers. Linear Support Vector Machines

Support Vector Machines

Support Vector Machines. Introduction to Data Mining, 2 nd Edition by Tan, Steinbach, Karpatne, Kumar

Support Vector Machines

Support Vector Machines

Linear classifiers selecting hyperplane maximizing separation margin between classes (large margin classifiers)

Support Vector Machines

L5 Support Vector Classification

Support Vector Machine

Foundation of Intelligent Systems, Part I. SVM s & Kernel Methods

Support Vector Machines and Speaker Verification

Linear classifiers selecting hyperplane maximizing separation margin between classes (large margin classifiers)

Indirect Rule Learning: Support Vector Machines. Donglin Zeng, Department of Biostatistics, University of North Carolina

Max Margin-Classifier

Kernels and the Kernel Trick. Machine Learning Fall 2017

Chapter 9. Support Vector Machine. Yongdai Kim Seoul National University

Machine Learning : Support Vector Machines

Introduction to Machine Learning Spring 2018 Note Duality. 1.1 Primal and Dual Problem

Polyhedral Computation. Linear Classifiers & the SVM

Review: Support vector machines. Machine learning techniques and image analysis

About this class. Maximizing the Margin. Maximum margin classifiers. Picture of large and small margin hyperplanes

MACHINE LEARNING. Support Vector Machines. Alessandro Moschitti

Support Vector Machines

Support Vector Machines. CSE 6363 Machine Learning Vassilis Athitsos Computer Science and Engineering Department University of Texas at Arlington

Support Vector Machines and Kernel Methods

CS798: Selected topics in Machine Learning

Lecture Notes on Support Vector Machine

Kernel Methods. Barnabás Póczos

Support Vector Machines for Classification: A Statistical Portrait

Support Vector Machines. Maximizing the Margin

Support Vector Machines for Classification and Regression. 1 Linearly Separable Data: Hard Margin SVMs

UVA CS / Introduc8on to Machine Learning and Data Mining. Lecture 9: Classifica8on with Support Vector Machine (cont.

Support Vector Machines for Classification and Regression

CS6220: DATA MINING TECHNIQUES

Machine Learning And Applications: Supervised Learning-SVM

Statistical Machine Learning from Data

LINEAR CLASSIFICATION, PERCEPTRON, LOGISTIC REGRESSION, SVC, NAÏVE BAYES. Supervised Learning

Linear classifiers Lecture 3

EE613 Machine Learning for Engineers. Kernel methods Support Vector Machines. jean-marc odobez 2015

Support Vector Machines and Kernel Methods

LECTURE 7 Support vector machines

Support Vector Machine for Classification and Regression

Learning with kernels and SVM

Pattern Recognition and Machine Learning. Perceptrons and Support Vector machines

Support Vector Machines, Kernel SVM

SVMs, Duality and the Kernel Trick

ν =.1 a max. of 10% of training set can be margin errors ν =.8 a max. of 80% of training can be margin errors

Convex Optimization and Support Vector Machine

Classifier Complexity and Support Vector Classifiers

Announcements - Homework

Transcription:

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 of Teas at Austin 8 -layer Neural Net Reading: Duda, Hart & Stork, Sec. 5.11 "A Tutorial on Support Vector Machines for Pattern Recognition," Christopher Burges 9 Perceptron Revisited: Linear Separators Binary classification can be viewed as the task of separating classes in feature space: Linear Separators Which of the linear separators is optimal? w T + b > w T + b = w T + b < f() = sign(w T + b) 1 11

Classification Margin Distance from eample i to the separator is r = wt i + b w Training eamples closest to the hyperplane are support vectors. Margin ρ of the separator is the distance from the separator to support vectors. ρ Maimum Margin Classification Maimizing the margin is good according to intuition and PAC (Probably Approimately Correct) theory. Implies that only support vectors matter; other training eamples are ignorable. r 1 Solved as a Quadratic Programming Problem 13 Linear SVM Mathematically Let training set {( i, y i )} i=1..n, i R d, y i {-1, 1} be separated by a hyperplane with margin ρ. Then for each training eample ( i, y i ): w T i + b - ρ/ if y i = -1 w T i + b ρ/ if y i = 1 y i (w T i + b) ρ/ For every support vector s the above inequality is an equality. After rescaling w and b by ρ/ in the equality, we obtain that distance between each s and the hyperplane is Then the margin can be epressed through (rescaled) w and b as: Linear SVMs Mathematically (cont.) Then we can formulate the quadratic optimization problem: is maimized and for all ( i, y i ), i=1..n : y i (w T i + b) 1 Which can be reformulated as: Φ(w) = w =w T w is minimized and for all ( i, y i ), i=1..n : y i (w T i + b) 1 14 15 Solving the Optimization Problem Φ(w) =w T w is minimized and for all ( i, y i ), i=1..n : y i (w T i + b) 1 Need to optimize a quadratic function subject to linear constraints. Quadratic optimization problems are a well-known class of mathematical programming problems for which several (non-trivial) algorithms eist. The solution involves constructing a dual problem where a Lagrange multiplier α i is associated with every inequality constraint in the primal (original) problem: Find α 1 α n such that Q(α) =Σα i - ½ΣΣα i α j y i y j it j is maimized and () α i for all α i 16 The Optimization Problem Solution Given a solution α 1 α n to the dual problem, solution to the primal is: w =Σα i y i i b = y k - Σα i y i i T k for any α k > Each non-zero α i indicates that corresponding i is a support vector. Then the classifying function is (note that we don t need w eplicitly): f() = Σα i y i it + b Notice that it relies on an inner product between the test point and the support vectors i we will return to this later. Also keep in mind that solving the optimization problem involved computing the inner products it j between all training points. 17 3

Soft Margin Classification What if the training set is not linearly separable? Slack variables ξ i can be added to allow misclassification of difficult or noisy eamples, resulting margin called soft. Soft Margin Classification Mathematically The old formulation: Φ(w) =w T w is minimized and for all ( i,y i ), i=1..n : y i (w T i + b) 1 ξ i ξ i Modified formulation incorporates slack variables: Φ(w) =w T w + CΣξ i is minimized and for all ( i,y i ), i=1..n : y i (w T i + b) 1 ξ i,, ξ i Parameter C can be viewed as a way to control overfitting: it trades off the relative importance of maimizing the margin and fitting the training data. 18 19 Soft Margin Classification Solution Dual problem is identical to separable case (would not be identical if the - norm penalty for slack variables CΣξ i was used in primal objective, we would need additional Lagrange multipliers for slack variables): Find α 1 α N such that Q(α) =Σα i - ½ΣΣα i α j y i y j it j is maimized and () α i C for all α i Again, i with non-zero α i will be support vectors. Solution to the dual problem is: w =Σα i y i i b= y k (1- ξ k ) - Σα i y i it k for any k s.t. α k > Again, we don t need to compute w eplicitly for classification: f() = Σα i y i it + b Linear SVMs: Overview The classifier is a separating hyperplane. Most important training points are support vectors; they define the hyperplane. Quadratic optimization algorithms can identify which training points i are support vectors with non-zero Lagrangian multipliers α i. Both in the dual formulation of the problem and in the solution training points appear only inside inner products: Find α 1 α N such that Q(α) =Σα i - ½ΣΣα i α j y i y j it j is maimized and () α i C for all α i f() = Σα i y i it + b 1 Non-linear SVMs Datasets that are linearly separable with some noise work out great: But what are we going to do if the dataset is just too hard? Non-linear SVMs: Feature spaces General idea: the original feature space can always be mapped to some higher-dimensional feature space where the training set is separable: Φ: φ() How about mapping data to a higher-dimensional space: Video Eample: http://www.youtube.com/watch?v=3licbrzprza 3 4

The Kernel Trick The linear classifier relies on inner product between vectors K( i, j )= it j If every datapoint is mapped into high-dimensional space via some transformation Φ: φ(), the inner product becomes: K( i, j )= φ( i ) T φ( j ) A kernel function is a function that is eqiuvalent to an inner product in some feature space. Eample: -dimensional vectors =[ 1 ]; let K( i, j )=(1 + it j ), Need to show that K( i, j )= φ( i ) T φ( j ): K( i, j )=(1 + it j ),= 1+ i1 j1 + i1 j1 i j + i j + i1 j1 + i j = = [1 i1 i1 i i i1 i ] T [1 j1 j1 j j j1 j ] = = φ( i ) T φ( j ), where φ() = [1 1 1 1 ] Thus, a kernel function implicitly maps data to a high-dimensional space (without the need to compute each φ() eplicitly). 4 What Functions are Kernels? For some functions K( i, j ) checking that K( i, j )= φ( i ) T φ( j ) can be cumbersome. Mercer s theorem: Every semi-positive definite symmetric function is a kernel Semi-positive definite symmetric functions correspond to a semi-positive definite symmetric Gram matri: K= K( 1, 1 ) K( 1, ) K( 1, 3 ) K( 1, n ) K(, 1 ) K(, ) K(, 3 ) K(, n ) K( n, 1 ) K( n, ) K( n, 3 ) K( n, n ) 5 Eamples of Kernel Functions Linear: K( i, j )= it j Mapping Φ: φ(), where φ() is itself Polynomial of power p: K( i, j )= (1+ it j ) p Mapping Φ: φ(), where φ() has dimensions Dual problem formulation: Non-linear SVMs Mathematically Find α 1 α n such that Q(α) =Σα i - ½ΣΣα i α j y i y j K( i, j ) is maimized and () α i for all α i Gaussian (radial-basis function): K( i, j ) = Mapping Φ: φ(), where φ() is infinite-dimensional: every point is mapped to a function (a Gaussian); combination of functions for support vectors is the separator. Higher-dimensional space still has intrinsic dimensionality d (the mapping is not onto), but linear separators in it correspond to non-linear separators in original space. 6 The solution is: f() = Σα i y i K( i, j )+ b Optimization techniques for finding α i s remain the same! 7 SVM applications SVMs were originally proposed by Boser, Guyon and Vapnik in 199 and gained increasing popularity in late 199s. SVMs are currently among the best performers for a number of classification tasks ranging from tet to genomic data. SVMs can be applied to comple data types beyond feature vectors (e.g. graphs, sequences, relational data) by designing kernel functions for such data. SVM techniques have been etended to a number of tasks such as regression [Vapnik et al. 97], principal component analysis [Schölkopf et al. 99], etc. Tuning SVMs remains a black art: selecting a specific kernel and parameters is usually done in a try-and-see manner. Implementations: See libsvm, svmlight, and others 8 5