Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML ›...

41
Optimization Methods in Machine Learning Lecture 15

Transcript of Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML ›...

Page 1: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Optimization Methods in Machine Learning Lecture 15

TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAAAAAAAA

Page 2: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Optimization Methods for SVMs

•  Stochastic gradient method •  Block-coordinate descent •  Active set method

Page 3: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Support Vector Machines

+ -

Page 4: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Classification SVM Problem

Page 5: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Classification SVM Problem

Page 6: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Stochastic gradient approach

Page 7: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Unconstrained formulation of the SVM problem

Page 8: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Subgradient step

Page 9: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

SVM problem using Huber loss function

Page 10: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Approximate subgradient step

Page 11: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Stochastic Gradient Method

Page 12: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Convergence in expectation

Page 13: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Why does this work?

Page 14: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.
Page 15: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.
Page 16: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.
Page 17: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.
Page 18: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Optimization Problem

Linear formulation Kernel formulation

Page 19: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Support Vectors

+ -

x x

x

x ®=c

0<®<c

®=0

0<®<c

0<®<c

®=0

Page 20: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Decomposition Methods

Page 21: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Dual Optimization Problem

Page 22: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Decomposition approach

Page 23: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Active set method for convex QP

Solve this “small” QP problem by any method

Page 24: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Decomposition Method

How to determine the next set B? Look for steepest descent direction of size |B|.

Page 25: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Finding the new set B

Ordered vector

Pick the same number of di = yi and di = ¡ yimaking sure that di satisfy the conditionsfrom prev. slide

Page 26: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Workload of a decomposition method

Page 27: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Reducing the cost of finding the new set B

Reduce the size of the vector

by ignoring the elements that are likely to be in the middle (for example because they were in the middle last 100 iterations)

But we do need to compute the entire vector to verify optimality!

Page 28: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Complexity

Page 29: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Interior point methods Cplex, OOQP, OOPS, Mosek

O(k2n)£ O(n log(1/²) O(k2n) in practice, very accurate solutions

Active set method SVM-QP, Cplex

Exponential in theory O(nsn2) in practice, very accurate solutions

Decomposition methods SMO, SVMlight

O(n^2/²), reasonably accurate solutions

Cutting plane methods SVMperf

O(Rns/²), no accurate solutions

Stochastic Gradient Pegasos

O(Rs/²), probabilitsitc results, requires i.i.d samples, no accurate solutions

Page 30: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Optimality Conditions

Page 31: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Active Set

Page 32: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Partitioning of matrix Q

Page 33: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

+ -

Page 34: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

+ -

Page 35: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

+ -

Page 36: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

+ -

Page 37: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Active Set Method

Page 38: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Active Set Method

Page 39: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Active Set Method

Page 40: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Active Set Method

Page 41: Optimization Methods in Machine Learning Lecture 15 › katyas › files › OPTML › Lecture15.pdfOptimization Methods in Machine Learning Lecture 15 TexPoint fonts used in EMF.

Complexity