. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Lecture 26: Support Vector Classifjcation, Unsupervised Learning
Instructor: Prof. Ganesh Ramakrishnan
October 27, 2016 1 / 28
Lecture 26: Support Vector Classifjcation, Unsupervised Learning - - PowerPoint PPT Presentation
. . . . . . . . . . . . . . . . . Lecture 26: Support Vector Classifjcation, Unsupervised Learning Instructor: Prof. Ganesh Ramakrishnan October 27, 2016 . . . . . . . . . . . . . . . . . . . . . . . 1 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
October 27, 2016 1 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
October 27, 2016 2 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
October 27, 2016 3 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
▶ We now quickly do the same for classifjcation October 27, 2016 3 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
October 27, 2016 4 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
w x i b
i (for y i
) w x i b
i (for y i
)
i,
October 27, 2016 5 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
w⊤φ(x(i)) + b ≥ +1 − ξi (for y(i) = +1) w⊤φ(x(i)) + b ≤ −1 + ξi (for y(i) = −1)
October 27, 2016 5 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
∥w∥]
October 27, 2016 6 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
∥w∥]
w
October 27, 2016 7 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
∥w∥]
2 ∥w∥
October 27, 2016 7 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 ∥w∥
i, the constraints become easily satisfjable for any
i’s. E.g., minimize i
October 27, 2016 8 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 ∥w∥
October 27, 2016 8 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
i ) = arg min w,b,ξi
n
i=1
2 ∥w∥, minimize 1 2∥w∥2
2∥w∥2 is monotonically decreasing with respect to 2 ∥w∥)
2 ∥w∥
October 27, 2016 9 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
October 27, 2016 10 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Approach 1: The Reproducing Kernel Hilbert Space and Representer theorem
2 Approach 2: Derive using First principles (provided for completeness in Tutorial 9) October 27, 2016 11 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Generalized from derivation of Kernel Logistic Regression, Tutorial 7, Problem 3. See
2 Let X be the space of examples such that D =
3 (Optional)1 The solution f∗ ∈ H (Hilbert space) to the following problem
f∈H m
i=1
i=1 αiK(x, x(i)), provided Ω(
1Proof provided in optional slide deck at the end October 27, 2016 12 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 (Optional) The solution f∗ ∈ H (Hilbert space) to the following problem
f∈H m
i=1
i=1 αiK(x, x(i)), provided Ω(
2 More specifjcally, if f (x) = wTφ(x) + b and K(x′, x) = φT(x)φ(x′) then the solution
w,b m
i=1
i=1 αiK(x, x(i)), provided Ω(
October 27, 2016 13 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 The SVC Objective
i ) = arg min w,b,ξi C m
i=1
2 Can be rewritten as
i ) = arg min w,b,ξi C m
i=1
3 That is,
i ) = arg min w,b,ξi C m
i=1
October 27, 2016 14 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 If f (x) = wTφ(x) + b and K(x′, x) = φT(x)φ(x′) and given the SVC objective
i ) = arg min w,b,ξi C m
i=1
2 setting E
2∥w∥2,
i=1 αiK(x, x(i))
October 27, 2016 15 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
α −1
i
j
i
i αiy(i) = 0
October 27, 2016 16 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
October 27, 2016 17 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
i=1
m
i=1
m j 1 jK x x j
m i m j
j
m j jK x i x j
m w
m i m j iK x i x j j
October 27, 2016 18 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
T
t=1
n
i=1
n
i=1
2Try it yourself. Prove that H is closed under vector addition and (real) scalar multiplication. October 27, 2016 19 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S
t=1
s) ∈ H and h(.) = T
t=1
S
s=1
T
t=1
s, xt)
S
s=1
T
t=1
s, xt) = S
s=1
3Again, you can verify that ⟨f, g⟩ is indeed an inner product following properties such as symmetry, linearity
in the fjrst argument and positive-defjniteness: https://en.wikipedia.org/wiki/Inner_product_space
October 27, 2016 20 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
i=1
m
i=1
m
i=1
m
i=1
October 27, 2016 21 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
m
m
i=1
m
i=1
m
i=1
m
j=1
m
j=1
October 27, 2016 22 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 which is a strictly monotonically increasing function of
λ
i=1
m
i=1
m
i=1
m
i=1
m
i=1
m
i iK x i x
October 27, 2016 23 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
October 27, 2016 24 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2∥w∥2 + C ∑n i=1 ξi
α,µ L∗(α, µ) ≤ min w,b,ξ
n
i=1
October 27, 2016 25 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
α,µ L∗(α, µ) = min w,b,ξ
n
i=1
α,µ L∗(α, µ)
October 27, 2016 26 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2∥w∥2 + C ∑n i=1 ξi + n
i=1
n
i=1
▶ w.r.t. w: w =
n
∑
i=1
αiy(i)φ(x(i))
▶ w.r.t. b: −b
n
∑
i=1
αiy(i) = 0
▶ w.r.t. ξi: αi + µi = C
2
i
j αiαjy(i)y(j)φ⊤(x(i))φ(x(j)) + C ∑ i ξi + ∑ i αi − ∑ i αiξi −
i αiy(i) ∑ j αjy(j)φ⊤(x(j))φ(x(i)) − b ∑ i αiy(i) − ∑ i µiξi
2
i
j αiαjy(i)y(j)φ⊤(x(i))φ(x(j)) + ∑ i αi
October 27, 2016 27 / 28
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
α −1
i
j
i
i αiy(i) = 0
October 27, 2016 28 / 28