CS480/680 Lecture 14: June 24, 2019 Support Vector Machines - - PowerPoint PPT Presentation

cs480 680 lecture 14 june 24 2019
SMART_READER_LITE
LIVE PREVIEW

CS480/680 Lecture 14: June 24, 2019 Support Vector Machines - - PowerPoint PPT Presentation

CS480/680 Lecture 14: June 24, 2019 Support Vector Machines (continued) [B] Sec. 7.1 [D] Sec. 11.5-11.6 [HTF] Chap. 12 [M] Sec. 14.5 [RN] 18.9 [MRT] Chap. 4 University of Waterloo CS480/680 Spring 2019 Pascal Poupart 1 Overlapping Class


slide-1
SLIDE 1

CS480/680 Lecture 14: June 24, 2019

Support Vector Machines (continued) [B] Sec. 7.1 [D] Sec. 11.5-11.6 [HTF]

  • Chap. 12 [M] Sec. 14.5 [RN] 18.9 [MRT]
  • Chap. 4

CS480/680 Spring 2019 Pascal Poupart 1 University of Waterloo

slide-2
SLIDE 2

Overlapping Class Distributions

  • So far we assumed that data is linearly separable

– High dimensions help for linear separability, but may hurt for generalization

  • But what if the data is noisy (mistakes or outliers)

– Constraints should allow misclassifications

  • Picture

CS480/680 Spring 2019 Pascal Poupart 2 University of Waterloo

slide-3
SLIDE 3

Soft margin

  • Idea: relax constraints by introducing slack variables

!" ≥ 0 %" &'( )* ≥ 1 − !" ∀.

  • Picture:

CS480/680 Spring 2019 Pascal Poupart 3 University of Waterloo

slide-4
SLIDE 4

Soft margin classifier

  • New optimization problem:

min

$,&

' (

)*+ ,

  • ) + 1

2 $

1

s.t. 2) $34 56 ≥ 1 − -) and -) ≥ 0 ∀;

  • where ' > 0 controls the trade-off between the

slack variable penalty and the margin

CS480/680 Spring 2019 Pascal Poupart 4 University of Waterloo

slide-5
SLIDE 5

Soft margin classifier

  • Notes:

1. Since ∑" #" is an upper bound on the # of misclassifications, $ can also be thought as a regularization coefficient that controls the trade-off between error minimization and model complexity 2. When $ → ∞, then we recover the original hard margin classifier 3. Soft margins handle minor misclassifications, but the classifier is still very sensitive to outliers

CS480/680 Spring 2019 Pascal Poupart 5 University of Waterloo

slide-6
SLIDE 6

Support Vectors

  • As before support vectors correspond to active

constraints

!" #$% &' = 1 − +" – i.e., all points that are in the margin or misclassified

  • Picture:

CS480/680 Spring 2019 Pascal Poupart 6 University of Waterloo

slide-7
SLIDE 7

Multiclass SVMs

  • Three methods:
  • 1. One-against-all: for ! classes, train ! SVMs to

distinguish each class from the rest

  • 2. Pairwise comparison: train "(!$) SVMs to

compare each pair of classes

  • 3. Continuous ranking: single SVM that returns a

continuous value to rank all classes

CS480/680 Spring 2019 Pascal Poupart 7 University of Waterloo

slide-8
SLIDE 8

One-Against-All

  • For ! classes, train ! SVMs to distinguish each class

from the rest

  • Picture:
  • Problem: what if different classes are returned by

different SVMs?

CS480/680 Spring 2019 Pascal Poupart 8 University of Waterloo

slide-9
SLIDE 9

Pairwise Comparison

  • Train !(#$) SVMs to compare each pair of classes
  • Picture:
  • Problem: how do we pick the best class?

CS480/680 Spring 2019 Pascal Poupart 9 University of Waterloo

slide-10
SLIDE 10

Continuous Ranking

  • Single SVM that returns a continuous value to rank

all classes

  • Picture:
  • Most popular approach today

CS480/680 Spring 2019 Pascal Poupart 10 University of Waterloo

slide-11
SLIDE 11

Continuous Ranking

  • Idea: instead of computing the sign of a linear

separator, compare the values of linear functions for each class !

  • Classification:

"∗ = %&'(%)* +*

,-(/∗)

CS480/680 Spring 2019 Pascal Poupart 11 University of Waterloo

slide-12
SLIDE 12

Multiclass Margin

  • For each class ! ≠ # define a linear constraint:

$%

&' ( − $* &' ( ≥ 1

∀! ≠ #

  • This guarantees a margin of at least 1

CS480/680 Spring 2019 Pascal Poupart 12 University of Waterloo

slide-13
SLIDE 13

Multiclass Classification

  • Optimization problem:

min

$ % & ∑( )( &

s.t. )*+

, - ./ − )( ,- ./ ≥ 1

∀4, 6 ≠ 8/

  • Equivalent to binary SVM when we have only two

classes

CS480/680 Spring 2019 Pascal Poupart 13 University of Waterloo

slide-14
SLIDE 14

Overlapping classes

  • Add slack variables:

min

$,& ' ∑) *) + ,

  • ∑. /.
  • s.t. 012

3 4 5) − /. 34 5) ≥ 1 − *) ∀:, ; ≠ =.

  • Equivalent to binary SVM when we have only two

classes

CS480/680 Spring 2019 Pascal Poupart 14 University of Waterloo