Support Vector Machines Instructor Max Welling ICS273A UCIrvine.

Slides:



Advertisements
Similar presentations
Introduction to Support Vector Machines (SVM)
Advertisements

Support Vector Machine
Lecture 9 Support Vector Machines
SVM - Support Vector Machines A new classification method for both linear and nonlinear data It uses a nonlinear mapping to transform the original training.
Classification / Regression Support Vector Machines
CHAPTER 10: Linear Discrimination
Pattern Recognition and Machine Learning
An Introduction of Support Vector Machine
Support Vector Machines
1 Lecture 5 Support Vector Machines Large-margin linear classifier Non-separable case The Kernel trick.
SVM—Support Vector Machines
Support vector machine
Search Engines Information Retrieval in Practice All slides ©Addison Wesley, 2008.
SVMs Reprised. Administrivia I’m out of town Mar 1-3 May have guest lecturer May cancel class Will let you know more when I do...
Separating Hyperplanes
Support Vector Machines
Support Vector Machines (and Kernel Methods in general)
Support Vector Machines and Kernel Methods
Support Vector Classification (Linearly Separable Case, Primal) The hyperplanethat solves the minimization problem: realizes the maximal margin hyperplane.
Margins, support vectors, and linear programming Thanks to Terran Lane and S. Dreiseitl.
Support Vector Machines Kernel Machines
Classification Problem 2-Category Linearly Separable Case A- A+ Malignant Benign.
Support Vector Machines
SVMs Finalized. Where we are Last time Support vector machines in grungy detail The SVM objective function and QP Today Last details on SVMs Putting it.
Lecture outline Support vector machines. Support Vector Machines Find a linear hyperplane (decision boundary) that will separate the data.
SVMs Reprised Reading: Bishop, Sec 4.1.1, 6.0, 6.1, 7.0, 7.1.
Support Vector Machines
Lecture 10: Support Vector Machines
Greg GrudicIntro AI1 Support Vector Machine (SVM) Classification Greg Grudic.
Optimization Theory Primal Optimization Problem subject to: Primal Optimal Value:
SVMs, cont’d Intro to Bayesian learning. Quadratic programming Problems of the form Minimize: Subject to: are called “quadratic programming” problems.
An Introduction to Support Vector Machines Martin Law.
Support Vector Machines
Ch. Eick: Support Vector Machines: The Main Ideas Reading Material Support Vector Machines: 1.Textbook 2. First 3 columns of Smola/Schönkopf article on.
Outline Separating Hyperplanes – Separable Case
SVM by Sequential Minimal Optimization (SMO)
CS 8751 ML & KDDSupport Vector Machines1 Support Vector Machines (SVMs) Learning mechanism based on linear programming Chooses a separating plane based.
1 SUPPORT VECTOR MACHINES İsmail GÜNEŞ. 2 What is SVM? A new generation learning system. A new generation learning system. Based on recent advances in.
CS Statistical Machine learning Lecture 18 Yuan (Alan) Qi Purdue CS Oct
An Introduction to Support Vector Machines (M. Law)
Machine Learning Weak 4 Lecture 2. Hand in Data It is online Only around 6000 images!!! Deadline is one week. Next Thursday lecture will be only one hour.
CS 478 – Tools for Machine Learning and Data Mining SVM.
Kernel Methods: Support Vector Machines Maximum Margin Classifiers and Support Vector Machines.
Sparse Kernel Methods 1 Sparse Kernel Methods for Classification and Regression October 17, 2007 Kyungchul Park SKKU.
An Introduction to Support Vector Machine (SVM)
1  The Problem: Consider a two class task with ω 1, ω 2   LINEAR CLASSIFIERS.
Supervised Learning. CS583, Bing Liu, UIC 2 An example application An emergency room in a hospital measures 17 variables (e.g., blood pressure, age, etc)
1  Problem: Consider a two class task with ω 1, ω 2   LINEAR CLASSIFIERS.
Support Vector Machines. Notation Assume a binary classification problem. –Instances are represented by vector x   n. –Training examples: x = (x 1,
Text Classification using Support Vector Machine Debapriyo Majumdar Information Retrieval – Spring 2015 Indian Statistical Institute Kolkata.
Support Vector Machines Reading: Ben-Hur and Weston, “A User’s Guide to Support Vector Machines” (linked from class web page)
Greg GrudicIntro AI1 Support Vector Machine (SVM) Classification Greg Grudic.
Kernel Methods: Support Vector Machines Maximum Margin Classifiers and Support Vector Machines.
Support Vector Machine: An Introduction. (C) by Yu Hen Hu 2 Linear Hyper-plane Classifier For x in the side of o : w T x + b  0; d = +1; For.
CSSE463: Image Recognition Day 14 Lab due Weds. Lab due Weds. These solutions assume that you don't threshold the shapes.ppt image: Shape1: elongation.
1 Support Vector Machines: Maximum Margin Classifiers Machine Learning and Pattern Recognition: September 23, 2010 Piotr Mirowski Based on slides by Sumit.
Support Vector Machines
Support vector machines
PREDICT 422: Practical Machine Learning
Support Vector Machine
Support Vector Machines
An Introduction to Support Vector Machines
Support Vector Machines Introduction to Data Mining, 2nd Edition by
Statistical Learning Dong Liu Dept. EEIS, USTC.
CSSE463: Image Recognition Day 14
Support vector machines
Support Vector Machines
Support vector machines
Support vector machines
SVMs for Document Ranking
Presentation transcript:

Support Vector Machines Instructor Max Welling ICS273A UCIrvine

Philosophy First formulate a classification problem as finding a separating hyper-plane that maximizes “the margin”. Allow for errors in classification using “slack-variables”. Convert problem to the “dual problem”. This problem only depends on inner products between feature vectors which can be replaced with kernels. A kernel is like using an infinite number of features.

The Margin Large margins are good for generalization performance (on future data). Note: this is very similar to logistic regression (but not identical).

Primal Problem We would like to find an expression for the margin (a distance). Points on the decision line satisfy: First imagine the line goes through the origin: Then shift origin: Choose w

Primal Problem w Points on support vector lines (dashed) are given by: If I change: the equations are still valid. Thus we can choose without loss of generality.

Primal Problem We can express the margin as: Recall: we want to maximize the margin, such that all data-cases end up on the correct side of the support vector lines. w 2/||w|| is always true. Check this also for b in (-1,0).

Primal problem (QP) alternative derivation margin alternative primal problem formulation

Slack Variables It is not very realistic to think assume that the data are perfectly separable. Solution: add slack variables to allow violations of constraints: However, we should try to minimize the number of violations. We do this by adding a term to the objective:

Features Let’s say we wanted to define new features: The problem would then transform to: Rationale: data that is linearly non-separable in low dimensions may become linearly separable in high dimensions (provided sensible features are chosen).

Dual Problem Let’s say we wanted very many features (F>>N), or perhaps infinitely many features. In this case we have very many parameters w to fit. By converting to the dual problem, we have to deal with exactly N parameters. This is a change of basis, where we recognize that we only need dimensions inside the space spanned by the data-cases. The transformation to the dual is rooted in the theory of constrained convex optimization. For a convex problem (no local minima) the dual problem is equivalent to the primal problem (i.e. we can switch between them).

Dual Problem (QP) The should be interpreted as forces acting on the data-items. Think of a ball running down a hill (optimizing w over ||w||^2). When it hits a wall, the wall start pushing back, i.e. the force is active. If data-item is on the correct side of the margin: no force active: If data-item is on the support-vector line (i.e. it is a support vector!) The force becomes active: If data-item is on the wrong side of the support vector line, the force is fully engaged: if no slack variables

Complementary Slackness The complementary slackness conditions come from the KKT conditions in convex optimization theory. From these conditions you can derive the conditions on alpha (previous slide) The fact that many alpha’s are 0 is important for reasons of efficiency.

Kernel Trick Note that the dual problem only depends on We can now move to infinite number of features by replacing: As long as the kernel satisfies 2 important conditions you can forget about the features Examples:

If we work in high dimensional feature spaces or with kernels, b has almost no impact on the final solution. In the following we set b=0 for convenience. One can derive a relation between the primal and dual variables (like the primal dual transformation, it requires Lagrange multipliers which we will avoid here. But see notes for background reading). Using this we can derive the prediction equation: Note that it depends on the features only through their inner product (or kernel). Note: prediction only involves support vectors (i.e. those vectors close to or on wrong side of the boundary). This is also efficient. Prediction

Conclusions kernel-SVMs are non-parametric classifiers: It keeps all the data around in the kernel-matrix. Still we often have parameters to tune (C, kernel parameters). This is done using X-validation or by minimizing a bound on the generalization error. SVMs are state-of-the-art (given a good kernel). SVMs are also slow (at least O(N^2)). However approximations are available to elevate that problem (i.e. O(N)).