Week 7 notes: Support Vector Machines

2017-08-30

Introduction

No notes.

Large Margin Classification
Optimization Objective

Support Vector Machine

Learn complex non-linear function.


Figure 1. Relation between Logistic Regression and SVM
Source: Coursera Machine Learning course

Large Margin Intuition

SVM Decision Boundary

Consider a case where we set constant C to be a very large value, when minimizing the optimization objective, we are going to be highly motivated to choose a value, so that the first term is equal to 0. So what would it take to make this first term equal to 0.


Figure 2. SVM optimization objective
Source: Coursera Machine Learning course

When the first term is equal to 0, we need to minimize (ignored θ0).

Linear separable case

The obtained decision boundary when minimizing the optimization objective will have the margin as large as possible (hence the name Large Margin Intuition).

This means SVM will choose the black decision boundary instead of the pink and green one:


Figure 3. Large margin classifier
Source: Coursera Machine Learning course

Mathematics Behind Large Margin Intuition

Vector Inner Product

p = length of projection of v onto u. p can be positive or negative.


Figure 4. Vector Inner Product
Source: Coursera Machine Learning course

SVM Decision Boundary

We can rewrite the optimization objective of SVM as follow:

s.t.

where p(i) is the projection of x(u) onto the vector θ.

Simplification: θ0 = 0.

According to the illustration below, with the minimal value of the magnitude of θ, the absolute value of p will large as much as possible (hence the large margin).


Figure 5. When the magnitude of θ is minimal, the margin is large
Source: Coursera Machine Learning course

More intuitive illustration:


Figure 5. The margin line
Source: Coursera Machine Learning course

Kernels

It’s a technique.

Kernels I
Kernels II