Support Vector Machines

Similar documents
Jeff Howbert Introduction to Machine Learning Winter

LECTURE 7 Support vector machines

Support Vector Machines

Pattern Recognition 2018 Support Vector Machines

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

Polyhedral Computation. Linear Classifiers & the SVM

A Tutorial on Support Vector Machine

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machines

CS 231A Section 1: Linear Algebra & Probability Review

CS 231A Section 1: Linear Algebra & Probability Review. Kevin Tang

Support Vector Machines for Classification: A Statistical Portrait

CS798: Selected topics in Machine Learning

Lecture 10: Support Vector Machine and Large Margin Classifier

Support Vector Machine & Its Applications

Support Vector Machines Explained

CS145: INTRODUCTION TO DATA MINING

Support Vector Machine (SVM) and Kernel Methods

Support Vector Machines

Lecture 10: A brief introduction to Support Vector Machine

Introduction to Machine Learning Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

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

Introduction to Support Vector Machines

Constrained Optimization and Support Vector Machines

Introduction to Support Vector Machines

Support Vector Machine for Classification and Regression

COMP 652: Machine Learning. Lecture 12. COMP Lecture 12 1 / 37

Machine Learning Support Vector Machines. Prof. Matteo Matteucci

Learning with kernels and SVM

CS4495/6495 Introduction to Computer Vision. 8C-L3 Support Vector Machines

SUPPORT VECTOR MACHINE

Support Vector Machine

Classification and Support Vector Machine

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

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

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

UVA CS 4501: Machine Learning

Support Vector Machine (continued)

18.9 SUPPORT VECTOR MACHINES

PAC-learning, VC Dimension and Margin-based Bounds

A short introduction to supervised learning, with applications to cancer pathway analysis Dr. Christina Leslie

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

Support Vector Machines

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

Discriminative Direction for Kernel Classifiers

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

Useful Equations for solving SVM questions

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

Nearest Neighbors Methods for Support Vector Machines

The fact that our heads are stuffed with neurons, and that we seemed to have evolved from primates.

Lecture 9: Large Margin Classifiers. Linear Support Vector Machines

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

Kernel Methods and Support Vector Machines

Pattern Recognition and Machine Learning. Perceptrons and Support Vector machines

Support Vector Machines

Support Vector Machines.

NONLINEAR CLASSIFICATION AND REGRESSION. J. Elder CSE 4404/5327 Introduction to Machine Learning and Pattern Recognition

CS 188: Artificial Intelligence. Outline

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

Support Vector Machines

Support Vector Machine (SVM) and Kernel Methods

Linear Classification and SVM. Dr. Xin Zhang

Introduction to Machine Learning

CS6375: Machine Learning Gautam Kunapuli. Support Vector Machines

Perceptron Revisited: Linear Separators. Support Vector Machines

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

Support Vector Machines

Kernelized Perceptron Support Vector Machines

SVM optimization and Kernel methods

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

Nonlinear Support Vector Machines through Iterative Majorization and I-Splines

Introduction to Logistic Regression and Support Vector Machine

Kernel Methods. Foundations of Data Analysis. Torsten Möller. Möller/Mori 1

LINEAR CLASSIFIERS. J. Elder CSE 4404/5327 Introduction to Machine Learning and Pattern Recognition

ML (cont.): SUPPORT VECTOR MACHINES

Chapter 6 Classification and Prediction (2)

Support Vector Machines

Statistical Pattern Recognition

Introduction to Support Vector Machines

Linear & nonlinear classifiers

CS 188: Artificial Intelligence Spring Announcements

Evaluation of Support Vector Machines and Minimax Probability. Machines for Weather Prediction. Stephen Sullivan

This is an author-deposited version published in : Eprints ID : 17710

Linear & nonlinear classifiers

Machine Learning 2010

Training Support Vector Machines: Status and Challenges

Mehryar Mohri Foundations of Machine Learning Courant Institute of Mathematical Sciences Homework assignment 3 April 5, 2013 Due: April 19, 2013

Support Vector Machines: Maximum Margin Classifiers

Convex Optimization and Support Vector Machine

Collaborative topic models: motivations cont

CSC 411 Lecture 17: Support Vector Machine

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

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

Brief Introduction of Machine Learning Techniques for Content Analysis

Linear classifiers Lecture 3

Linear Support Vector Machine. Classification. Linear SVM. Huiping Cao. Huiping Cao, Slide 1/26

Introduction to SVM and RVM

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

Statistical Machine Learning from Data

(Kernels +) Support Vector Machines

Transcription:

Support Vector Machines Mathematically Sophisticated Classification Todd Wilson Statistical Learning Group Department of Statistics North Carolina State University September 27, 2016 1 / 29 Support Vector Machines

Presentation Outline s history with SVM Overall history of SVM Sketch of SVM Derivation (weighted towards intuitive points) Implementation and Examples in R 2 / 29 Support Vector Machines

Previously at November 2014: The "Golden Age" of SVM Jami Jackson - Support Vector Machines Brian Naughton - Support Vector Machines for Ranking Models Huimin Peng - Support Vector Machines and Flexible Discriminant Analysis August 29 - September 6, 2016: The "Renaissance" of SVM Dr David Dickey - Introduction to Machine Learning Cliffhanger between two presentations about SVM September 20, 2016: Andrew Giffin inquires about SVM 3 / 29 Support Vector Machines

Inspiration for Today s Talk Nov 2014 talks based on Chapter 12 of The Elements of Statistical Learning by Hastie, Tibshirani, and Friedman Advanced text previously catered to a more advanced audience What makes this method a classifier? (Never asked for nearest neighbors, decision trees, etc) Some intuition is seen in the derivation - let s explore this! Hopefully, today makes all previous talks accessible 4 / 29 Support Vector Machines

History of SVM Vladimir Vapnik laid most of the groundwork for SVM while working on his PhD thesis in the Soviet Union in the 1960s Vapnik emigrated to US in 1990 to work with AT&T Cortes and Vapnik (1995) finally introduced SVM to the world SVM has been very popular topic in machine learning since mid 1990s 5 / 29 Support Vector Machines

Quotes "[SVM] needs to be in the tool bag of every civilized person" -Dr Patrick Winston, MIT "Wow! This topic is totally devoid of any statistical content" -Dr David Dickey, NCSU 6 / 29 Support Vector Machines

Visualization of Problem Image source: Open source via Wikibooks 7 / 29 Support Vector Machines

Visualization of Problem Image source: Open source via Wikibooks 8 / 29 Support Vector Machines

Problem Setup Suppose we have binary data (+ and ) in the plane Goal: Separate this data into two groups using a line Strategy: Find the street" which separates the data into two groups such that the street is as wide as possible and the equation that would correspond to the median" of this street Where a point is relative to this median will make our decision Intuition: The points in the street gutters," immediately on the sides of the street, might help us tell this story 9 / 29 Support Vector Machines

Updated Visualization of Problem Image source: http://scikit-learnorg/stable/auto_examples/svm/plot_separating_hyperplanehtml 10 / 29 Support Vector Machines

SVM Derivation (Sketch) Consider w, perpendicular to the median Also consider u, which we would like to classify Dot product w u finds the scalar projection of u onto w If this dot product > c, then it crosses the median line, and u classified as + we write: w u c u is +, or w u + b 0 u is +, where c = b 11 / 29 Support Vector Machines

SVM Derivation (Sketch) Good first try at a decision rule, but not unique If our decision rule is good, then if we know which data points are + and which are, then our rule should classify those points as + and, respectively, every time: w x + + b 1 w x + b 1 12 / 29 Support Vector Machines

SVM Derivation (Sketch) Introduce y i = 1 for + data and y i = 1 for data This preserves the first equation for the + data However, for the data, this flips the inequality and makes the 1 into 1 The two equations are now identical for any x: y i (x w + b) 1, or y i (x w + b) 1 0, for a data point x that is in a gutter How convenient! 13 / 29 Support Vector Machines

SVM Derivation (Sketch) Consider two gutter vectors x + and x To find the width of the street: Consider the difference vector, x + x Dot product of this and a unit vector in the direction of the median (w) will give us the width of the street w now needs to be a unit vector divide it by its magnitude Express the width of the street W as W = (x + x ) w w = (1 b) + (1 + b) w = 2 w 14 / 29 Support Vector Machines

Updated Visualization of Problem Image source: Open source via Wikibooks 15 / 29 Support Vector Machines

SVM Derivation (Sketch) Widest street possible: maximize 2 w 1 subject to given constraints Same as maximizing w 1 subject to the given constraints Same as minimizing w subject to the given constraints (Note: width is naturally nonnegative and f (w) = 1 2 w 2 monotone increasing for w 0) (Ahh, convexity) Same as minimizing 1 2 w 2 subject to the given constraints 16 / 29 Support Vector Machines

SVM Derivation (Sketch) How do we solve this minimization problem? QP Verifying the KKT conditions Lagrange multipliers We use MLM: L = 1 2 w 2 i α i [y i (x i w + b) 1], where the constraints in brackets are restricted to be zero Differentiate L with respect to the vector w and the constant b 17 / 29 Support Vector Machines

SVM Derivation (Sketch) d dw L = w α i y i x i = 0 i d db L = i α i y i = 0 w = i 0 = i α i y i x i α i y i 18 / 29 Support Vector Machines

SVM Derivation (Sketch) Placing these solutions back into L, we obtain [ ] L = 1 α i y i x i α j y j x j 2 i j [ ] α i y i x i α j y j x j i j i α i y i b i α i 19 / 29 Support Vector Machines

SVM Derivation (Sketch) L = i α i 1 2 i j α i α j y i y j (x i x j ) Note: This complicated math has actually given us some insight into how the solution is developed Our maximum only depends on dot products of data vectors 20 / 29 Support Vector Machines

SVM Derivation (Sketch) So, suppose we were given an unknown vector u to classify Then, our decision rule states i α i y i (x i u) + b 0 u is + This decision rule is fine in the ideal case of linear separability 21 / 29 Support Vector Machines

SVM Derivation (Sketch) what happens if the data are not linearly separable? Transform the data into a space where it is separable Consider the transformation ϕ(x) We saw that our decision rule takes dot products into accounts Better to understand K (x i, x j ) = ϕ(x i ) ϕ(x j ) than ϕ(x) Dr Winston: "This is a miracle" 22 / 29 Support Vector Machines

SVM Derivation (Sketch) We call K the kernel function When data not linearly separable, we must specify kernel Some popular kernels, for two vectors u and v: linear kernel: K (u, v) = (u v + 1) n radial basis kernel: K (u, v) = exp{ u v σ } 23 / 29 Support Vector Machines

Updated Visualization of Problem Image source: http://wwweric-kimnet/eric-kim-net/posts/1/kernel_trickhtml 24 / 29 Support Vector Machines

Generalization to Higher Dimensions Dr Dickey shared several examples with ϕ( ) : R 2 R 3 We found a plane that separated the data, then projected that plane in three-space back into a line in the Cartesian plane We eventually run out of dimensions to visualize and name Hence, traditional SVM lingo talks about a "separating hyperplane" in "hyperspace," even if we have easier nomenclature 25 / 29 Support Vector Machines

Where does SVM get its name? In actuality, the separating hyperplane is usually determined by only a handful of data points The points that help determine the hyperplane are called "support vectors" The hyperplane itself is a classifying "machine" 26 / 29 Support Vector Machines

What can I understand now? Check out s other SVM talks from Nov 2014! Jami s talk is a great introduction to the notation used by ESL Brian shows how to use SVM to obtain rankings Huimin shows the interaction of SVM and LDA All the terminology has been motivated in this talk 27 / 29 Support Vector Machines

Implementation in R R package: e1071 (most recent update: 2015) Package written by David Meyer et al, TU Wien, Austria Package based on C++ implementation, libsvm, by Chang and Lin (2001) Some examples in RMarkdown file 28 / 29 Support Vector Machines

References Chang, C C and Lin, C J (2001) LIBSVM: a library for support vector machines Software available at http://wwwcsientuedutw/ cjlin/libsvm Detailed documentation (algorithms, formulae, ) can be found at http://wwwcsientuedutw/ cjlin/papers/libsvmpsgz Cortes, C and Vapnik, V (1995) Support-vector network Machine Learning, 20, 125 L, Melvin "Support Vector Machines (SVM) Overview and Demo using R" YouTube, 5/22/16 Accessed 9/20/16 Meyer, David (2015) Support Vector Machines: The interface to libsvm in package e1071 R Project Winston, Patrick H 6034, Artificial Intelligence, Fall 2010 (MIT OpenCourseWare: Massachusetts Institute of Technology) https://wwwyoutubecom/watch?v=_pwhiwxhk8o (Accessed 9/20/16) License: Creative commons BY-NC-SA 29 / 29 Support Vector Machines