Learning From Data Lecture 23 SVM’s: Maximizing the Margin
A Better Hyperplane Maximizing the Margin Link to Regularization
- M. Magdon-Ismail
CSCI 4100/6100
Learning From Data Lecture 23 SVMs: Maximizing the Margin A Better - - PowerPoint PPT Presentation
Learning From Data Lecture 23 SVMs: Maximizing the Margin A Better Hyperplane Maximizing the Margin Link to Regularization M. Magdon-Ismail CSCI 4100/6100 recap: Linear Models, RBFs, Neural Networks Linear Model with Nonlinear Transform
CSCI 4100/6100
recap: Linear Models, RBFs, Neural Networks Linear Model with Nonlinear Transform Neural Network k-RBF-Network h(x) = θ w0 +
˜ d
wjΦj(x) h(x) = θ
m
wjθ (vj
tx)
k
wjφ (| | x − µj | |)
k-means
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 2 /19
Which separator to pick? − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 3 /19
Robustness to noise − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 4 /19
Thicker cushion means more robust − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 5 /19
Two crucial questions − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 6 /19
Pulling out the bias − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 7 /19
Separating the data − →
(renormalize the weights so that the signal wtx+b is meaningful)
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 8 /19
Distance to the hyperplane − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 9 /19
Fatness of a separating hyperplane − →
Fatness = Distance to the closest point
n dist(xn, h)
n yn(wtxn + b)
the margin γ(h)
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 10 /19
Maximizing the margin − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 11 /19
Equivalent form − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 12 /19
Example – our toy data set − →
yn(wtxn + b) ≥ 1
(i) and (iii) gives w1 ≥ 1 (ii) and (iii) gives w2 ≤ −1 So, 1
2(w2 1 + w2 2) ≥ 1 (b = −1, w1 = 1, w2 = −1)
1
2
0.707
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 13 /19
Quadratic programming − →
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 14 /19
Maximum margin hyperplane is QP − →
minimize
u∈Rq 1 2utQu + ctu
subject to: Au ≥ a u =
w
1 2wtw = b wt 0t
d
0d Id b wt
d
0d Id
⇒ Q =
d
0d Id
yn(wtxn + b) ≥ 1 ≡ yn ynxt
n
⇒ y1 y1xt
1
. . . . . . yN yNxt
N
u ≥ 1 . . . 1 = ⇒ A = y1 y1xt
1
. . . . . . yN yNxt
N
, c = 1 . . . 1
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 15 /19
Back to our example − →
yn(wtxn + b) ≥ 1
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 16 /19
Primal QP algorithm − →
1: Let p = 0d+1 be the (d + 1)-vector of zeros and c = 1N the N-vector of
3: The final hypothesis is g(x) = sign(w∗tx + b∗). c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 17 /19
Example: SVM vs PLA − →
0.02 0.04 0.06 0.08
PLA depends on the ordering of data (e.g. random)
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 18 /19
Link to regularization
c A M L Creator: Malik Magdon-Ismail
Maximizing the Margin: 19 /19