際際滷

際際滷Share a Scribd company logo
? ? ?
Classification
(??)
Supervised Learning
? | ? ★ ?
Given samples ? = ( ?1, ?1 , ?2, ?2 , ´ , (? ?, ? ?))
find!
http://cs.stanford.edu/people/karpathy/svmjs/demo/
Question 1) ?? ???(classifier)??
Question 2) ???? ?? ????
$ Bayesian Classifier : Error, Risk? minimize
(Likelihood or MAP ????? ????)
1. ???? 2?? ??? point?? ?? : feature? 2?
2. ??? point ( ?1, ??? point ( ?2 ?? ??
?1
?2
?1
?2
  
?? ?? ??? ???????
?1
?2
?1
?2
  
?1?? ???? ???? ?? ??? ??
?? 2? ???? ????
?? ??? ???? ???, ???? ????? ? ?? : Generalization
(??? ??? ??? ??? ??? ? ??????)
?1
?2
?1
?2

Generalization? ???
(???? ????? ??? ???? ??? ?? ??? ??.)
?? ??? ??? ??. ? ??(margin)? ?? ???, ??? ???.
? = ?1, ?2, ´ , ? ? ( ? ?, ? = ?1, ?2, ´ , ? ? ( ? ?, ? ( ?
? ? = ? ?
? + ? = 0
? ?(?)? ?? ??? ? ???? ????.
$ ?1? ? ? > 0? ??
$ ?2? ? ? < 0? ??
? ??? ???? ???? ?? ?? ??.
? ? : normal vector(???? ??), ? : ???? ??
? ??? ? ?1?? ?????? ??
? =
? ? ?
?
Decision Hyperplane
?1
?2
? ? = 0? ? > 0
? ? < 0
?? ??? (decision hyperplane)
? Constrained optimization problem (primal problem)
$ ? ( ? ?
is the optimization variable.
$ ?0: ? ?
★ ? is the objective function or cost function. (?? ??)
$ ??: ? ?
★ ?, ? = 1, ´ , ?, are inequality constraint functions.
$ ??: ? ?
★ ?, ? = 1, ´ , ?, are equality constraint functions.
$ optimal value ??
??
= inf ?0 ? ?? ? + 0, ? = 1, ´ , ?, ?? ? = 0, ? = 1, ´ , ?}
??? ??? ??
minimize ?0(?)
subject to ?? ? + 0 , ? = 1, ´ , ?
?? ? = 0 , ? = 1, ´ , ?
? Affine set
$ ? ? ? ?
is affine ★ ? ?? 2?? ?? ?? point? ??? line? ?? ?? ?.
$ ?? ??, ?? or hyperplane ?? ??.
? Convex set
$ ? ? ? ?
is convex ★ ? ?? 2?? ?? ?? point? ??? line segment? ?? ??
?.
$ ?? ??, ? or ??? ?? ??.
Affine / Convex
convex set (???)convex set (??)
line
line segment
? Affine function
$ a function composed of a linear function and constant (translation)
$ in 1-dim : ? = ?? + ?
$ in 2-dim : ? ?, ? = ?? + ?? + ?
$ in 3-dim : ? ?, ?, ? = ?? + ?? + ?? + ?
translation : a transformation consisting of a constant offset with no rotation or distortion
Affine function
? ?: ? ? ★ ? is convex if ??? ? is convex and
? ?? + 1 ? ? ? + ?? ? + 1 ? ? ? ?
for ??, ? ( ??? ?, 0 + ? + 1.
$ ? is concave if ?? is convex.
(?, ?(?))
(?, ?(?))
?(?? + 1 ? ? ?)
?? + 1 ? ? ?
?? ? + 1 ? ? ? ? ? minimum
??? ? : ?? ?? ??? ?? ?? ??. ? ??? ?? define?? ?????? ?? ??.
Convex function
? convex optimization problem
$ ?0, ´ , ?? are convex.
$ ?? ? = ??
?
? ? ?? , ? = 1, ´ , ? are affine.
$ The feasible set of a convex optimization problem is convex.
 Since ?1, ´ , ?? are convex, ????=1
?
??? ?? is convex.
 Since ? ?? ? = ??} is hyperplane, ????=1
?
? ?? ? = ??} is affine (i.e convex).
$ In a convex optimization, we minimize a convex objective function over a convex set.
convex optimization
minimize ?0(?)
subject to ?? ? + 0 , ? = 1, ´ , ?
??
?
? = ?? , ? = 1, ´ , ?
? Lagrangian ?: ? ? 〜 ? ? 〜 ? ? ★ ?,
? ?, Λ, ? = ?? ? + ?
?=1
?
?? ??(?) + ?
?=1
?
????(?)
with, ??? ? = ????=1
?
??? ?? ” ????=1
?
??? ?? 〜 ? ?
〜 ? ?
$ ?? is Lagrange multiplier associated with ?? ? + 0 and ? = (? ?, ´ , ? ?)
$ ?? is Lagrange multiplier associated with ?? ? = 0 and ? = (? ?, ´ , ? ?)
Lagrangian
? Lagrange dual function ?: ? ? 〜 ? ? ★ ?
? Lagrange dual problem
$ ?(Λ, ?) is concave and constraints are convex, so this is convex optimization
problem.
$ Lagrange dual problem? ?(Λ?
, ??
)? primal problem(??
) ?? lower bound? ??
??.
inf ?(??
, Λ?
, ??
) + ?0(??
)
? Λ, ? = inf
?(?
?(?, Λ, ? ) = inf
?(?
?0 ? + ?
?=1
?
?? ?? ? + ?
?=1
?
???? ?
Lagrange dual function /
Lagrange dual problem
maximize ?(Λ, ?)
subject to Λ ? 0
How to make it coincide?
? If
$ ?? are convex (????, inequality constraint)
$ ?? are affine (equality constraint)
$ ??
, Λ?
, ??
satisfy KKT condition
? Then
$ ??
is primal optimal and (Λ?
, ??
) is dual optimal with zero duality gap.
$ ? ?? ?? ????.
KKT condition and
zero duality
KKT conditions
?? ?> + 0, ? = 1, ´ , ?
?? ?> = 0, ? = 1, ´ , ?
??
>
− 0, ? = 1, ´ , ?
??
>
?? ?> = 0, ? = 1, ´ , ?
??0 ?> + σ?=1
?
??
>
???(?>) + σ?=1
?
??
>
???(?>) = 0
primal constraints
dual constraints
complementary slackness
gradient Lagrangian
with respect to ? vanishes at ?>
? Wolfe duality problem
$ ?0 is convex.
$ ??, ?? are differentiable. (Lagrange dual problem ★ Wolfe duality problem)
$ ????? KKT conditions? ?? ???? ?? ?????, ? ??? ?? ???
?? primal problem? ?? ??? ?? ????.
maximize ?0 ? + σ?=1
?
?? ?? ? + σ?=1
?
???? ?
subject to Λ ? 0
??0 ? + σ?=1
?
??
>
???(?) + σ?=1
?
??
>
???(?) = 0
Wolfe duality
?(?, Λ, ?)
? SVM? concept? ??(margin)?? ????.
? ? ??? ?? ??? ??(margin)? ??? ????? ????? ???.
$ ??(margin) : ?? ???(??)???? ?? ??? ????? ??? 2?
?1
?2
?1
?2
margin
How to find the best margin?
?1
?2
?1
?2
margin
separation band separation band
?? SVM
??? SVM
?? ?? ??? ??
?1
?2
?1
?2
separation band
(?? ? ?? ???? ???? ?? ?)
? Problem : margin? ????? ????? ???.
$ support vector, ? ?: ???????? ?? ??? sample
$ margin? ?? =
2 ? ? ?
?
=
2
?
(??? ???? rescale? ???. ??? 1? ??)
$ ???? ? = { ?1, ?1 , ?2, ?2 , ´ , ? ?, ? ? }
 if ?? ( ?1, then ?? = 1
 if ?? ( ?2, then ?? = ?1
☆ ?? : ?? ??? ?? ????. ? ?? ??? ?? ?? ??? ????.
maximize
2
?
subject to ? ?
?? + ? − 1 ??? ( ?1
? ?
?? + ? + ?1 ??? ( ?2
? Primal problem (??? ??? ??)
$
2
?
? ????? ??? ????
? 2
2
? ????? ??? ??? ? ??.
 ? ? =
1
2
? 2
? ? ? 2???? ???? ?? ??? convex ????.
 inequality constrain? ?? ???? ??? convex ????.
 inequality constrain? ????? ??(feasible)? convex set??.
$ Primal problem? convex optimization problem??.
$ Primal problem? ?? global solution? ??.
minimize ? ? =
?
?
? ?
subject to ?? ? ?
?? + ? − ? , ? = ?, ´ , ?
$ Primal problem? ??? ?? ??? ???? ???.
Primal problem
Lagrange dual problem
Wolfe dual problem
??? ??? ??
- Lagrangian ??
- Lagrange dual function ??
- Objective(Cost) function : convex
- constraints are differentiable.
? Lagrangian of primal problem
$ ? = ?1, ´ , ? ?
?
? Lagrange multiplier?? ??. ?? − 0 for ? = 1, ´ , ?
? ?, ?, ? =
1
2
? 2 ? ?
?=1
?
?? ?? ? ? ?? + ? ? 1
? Lagrange dual function of primal problem
? ? = inf
?,?
?(?, ?, ?) = inf
?,?
1
2
? 2 ? ?
?=1
?
?? ?? ? ? ?? + ? ? 1
? Lagrange dual problem of primal problem
maximize ? ? = inf
?,?
?(?, ?, ?)
subject to ? ? 0
? Wolfe dual problem
$ ????
1
2
? 2
? convex ????.
$ ????? ?????? ?? ?? ????.
maximize ? ?, ?, ? =
1
2
? 2
? σ?=1
?
?? ?? ? ?
?? + ? ? 1
subject to ? ? 0,
??
??
= 0,
??
??
= 0
?? − 0, ? = 1, ´ , ? ? = ?
?=1
?
?? ?? ?? ?
?=1
?
?? ?? = 0
maximize ? ? = σ?=1
?
?? ?
1
2
σ?=1
?
σ ?=1
?
?? ?? ?? ?? ??
?
??
subject to ?? − 0, ? = 1, ´ , ?
σ?=1
?
?? ?? = 0
? ? ?? ?? ??? ??? ??? ??? ?? 2?(quadratic) ?? ??? ??
? ??
? ?, ?? ??? ??? ??, Lagrange multiplier ?? ??? ??? ???
? ?? ???? ?? ?? ??? ?? ???? ??, ? ?? ?? ??? ??
??
?
???? ???
? ?2? ?? ???? ?
maximize ? ? = σ?=1
?
?? ?
1
2
σ?=1
?
σ ?=1
?
?? ?? ?? ?? ??
?
??
subject to ?? − 0, ? = 1, ´ , ?
σ?=1
?
?? ?? = 0
?? ?? ???? ??
(Soft margin)
?1
?2
?1
?2
separation band
(?? ? ?? ???? ?????, ????? ??? ??)
?1
?2
?1
?2
separation band



 ?? ?? ??? ???(support vector), ?? ?? ??? ??.
? ? + ?(? ?
? + ?)
 ?? ?? ??? ??, ??? ?? ??? ??? ??.
? ? + ? ? ?
? + ? < ?
 ?? ??? ?? ??? ??? ?? ??? ??? ??.
? ? ? ? ? + ? < ?
?1
?2
?1
?2
separation band



 ? + ?(? ?
? + ?) ? ? = 0
 ? + ? ? ? ? + ? < ? ? 0 < ? + 1
 ? ? ? ? + ? < ? ? ? > 1
slack ?? ?? ????, 3?? ???, ??? ??? ??
? ? ? ? + ? − ? ? ?
?1
?2
?1
?2
separation band



??? ???? ? ??? ?? 2?? ??? ????? ??.
- ?? 1 : margin? ??? ??? ??.
- ?? 2 : ,  ??? ???? ??? ?? ????? ??? ??.
?1
?2
?1
?2
2??? ??? ?? ????? ??? ?? ????? ??.
Ξ = (?1, ´ , ? ?)?? ??.
? ?, Ξ =
1
2
? 2
+ ? ?
?=1
?
??
? ?? ??? ?? ?? ??? ??? ???? ?? ??.
? = 0?? ??2? ????. ? = ±?? ?? 2? ????.
?1
?2
?1
?2
? = ±? = 0
? ?, Ξ =
1
2
? 2
+ ? ?
?=1
?
??
??? ?? ??? ????? ??.
minimize ? ? =
?
?
? ?
+ ? σ?=?
?
??
subject to ?? ? ?
?? + ? − ? ? ?? , ? = ?, ´ , ?
?? − ?, ? = ?, ´ , ?
????? ??????, ??? ??? ??? ??? ? ??.
? Primal problem (?? ?? ???? ??)
$ ???? ?(?)? convex????.
$ ??? ?? ??????.
? Lagrangian
? ?, ?, Ξ, ?, ? =
1
2
? 2 + ? ?
?=1
?
?? ? ?
?=1
?
?? ?? ? ? ?? + ? ? 1 + ?? + ?
?=1
?
?? ??
$ ? = (?1, ´ , ? ?), ? = (?1, ´ , ? ?), Ξ = (?1, ´ , ? ?)
? Wolfe dual problem
maximize ? ?, ?, Ξ, ?, ?
=
1
2
? 2 + ? σ?=1
?
?? ? σ?=1
?
?? ?? ? ? ?? + ? ? 1 + ?? + σ?=1
?
?? ??
subject to ? ? 0, ? ? 0,
??
??
= 0,
??
??
= 0,
??
?Ξ
= 0
?? − 0, ? = 1, ´ , ?
?? − 0, ? = 1, ´ , ?
? = ?
?=1
?
?? ?? ??
?
?=1
?
?? ?? = 0
? = ?? + ??
? Wolfe dual problem
$ soft margin ??? ??? ???? ?? ??? ? ?? ??? ??
 ?? = 0 : ???? support vector???, margin ???? ??.
 0 < ?? < ? : ???? support vector
 ?? = ? : ???? support vector???, margin ??? ??.
maximize ? ? = σ?=?
?
?? ?
?
?
σ?=?
? σ?=?
?
?? ?? ?? ?? ??
?
??
subject to σ?=?
?
?? ?? = ?
? + ?? + ?, ? = ?, ´ , ?
(Proof)
$ ??? ???? KKT ??? ????.
 ? = ?? + ??
 ?? ?? = 0
 ?? ?? ? ?
?? + ? ? 1 ? ?? = 0
∠ ?? − 0
$ ?? = ?
 ?? = 0, ?? − 0
 ?? ? ?
?? + ? ? 1 ? ?? = 0
? ?? ? ?
?? + ? + 1
$ ?? = 0
 ?? = ?, ?? = 0
 ?? ? ?
?? + ? ? 1 ? ?? − 0
? ?? ? ?
?? + ? − 1
$ 0 < ?? < ?
 0 < ?? < ?, ?? = 0
 ?? ? ?
?? + ? ? 1 ? ?? = 0
? ?? ? ?
?? + ? = 1
?? SVM
??? SVM
? ?? ???? ???? ?? ????? ?? ???? ?? ??? ???? ?
? ???? ??.
? ?? ?? ????? ?? ?? ???? ??? ? ??? ? ?? ??? ??
? ???? ???? ?? ?? ???? ?? ? ??.
?? ?? : ?? ?? ???
?1 ?2
?4?3
Φ: ? ★ ?
??? ?? : ?? ?? ??
?1
?4
?3
?2Φ ?? = ??
? ?? ??? ?? ??? ?? ??
Φ: ? ★ ?
$ ??, ?? ?? ??? ??? ?? ??.
? ?? ??(Kernel function)
$ ? ?? ?, ? ( ?
$ ? ?? Φ ? , Φ(?) ( ?
$ ?? ?: ? 〜 ? ★ ?(????)
? ?, ? = ? ? ? ?(?)
$ ?? ??? ?? ??? ? ??? ??? ?? ??? ??.
? = ?1, ?2
?, ? = ?1, ?2
? , ?, ? ( ?
? ?, ? = ? ? ? 2 = ?1
2
?1
2
+ 2?1 ?2 ?1 ?2 + ?2
2
?2
2
Φ ? = ?1
2
, 2?1 ?2, ?2
2
( ?
? ?, ? = ? ? ? 2
= ?1
2
?1
2
+ 2?1 ?2 ?1 ?2 + ?2
2
?2
2
= ?1
2
, 2?1 ?2, ?2
2
?1
2
, 2?1 ?2, ?2
2
= Φ ? ? Φ(?)
?, ???? ?? ?? ????.
Example
example )
? Kernel substitution
$ Kernel trick???? ??.
$ ?? ??? ??? ??? ???? ?? ?, ? ??? ?? ??? ???? ???
? ????.
$ ?? ??? ????? ?? ?? ?? ???? ?????. ??? ???? Φ? ?
?? ??? ?? ??? ???? ??? ???.
$ ??? ??? ???? ???.
$ ?? ??? ???? ??? ? ??.
? ?? ???? ?? ?? ?? ??? ?? ??? ???? ???? ?????
???? ?? ?? ?? Φ? ? ?? ??? ( ?, ?? ??? ? ???) ???
?? ?? ???? ??? ??
? ?? ???? SVM ???? ??? ????? ??
? ? = ?
?=1
?
?? ?
1
2
?
?=1
?
?
?=1
?
?? ?? ?? ?? ??
?
??
$ ?1, ?2 ( ?, ? = (?1, ´ , ? ?)
? ?? ?? ????, SVM ???? ??? ????? ??
? ? = ?
?=1
?
?? ?
1
2
?
?=1
?
?
?=1
?
?? ?? ?? ??Φ ??
?
Φ(??)
$ Φ ?1 , Φ ?2 ( ?
$ ???? ( ?
?
?=1
?
?? ?
1
2
?
?=1
?
?
?=1
?
?? ?? ?? ?? ?(?, ?)
?? ??? ???? ??
??? ?? ???? ??
??? ?? ?????? ???, ????? ???? ????? ??.
?????? ???? ???? ??
? ??? ??
? ?, ? = ? ? ? + 1 ?
? Radial Basis Function ??
? ?, ? = ?
?
??? 2
2?2
? ????? ??? ??
? ?, ? = tanh(?? ? ? + ?)
$ ?? ?, ?? ??? ????? ????? ???. ? = 2, ? = 1? ??? ???.
? 1? M-1??
$ ??? ?? ???? ??
 ??? ?? ???? ?? ??? ??? ? ? 1? ??? ??
 ??? ??? ??? ?? ??, ??? ??? ??? ?? ???? ??
$ ?? ??? ??? ?? ?? ? ??? ??
 ? = arg max
?
??(?)
? 1? 1??
$ ?? ?? ???? ?? ????
? ??1
2
? ??
 ???(?)? ??? ??? ???? ?? ???? ?? ???
 ?? ??? ???(?)? ??? ???? ?? ??? ??, ??? ??? ??? ??
 2? ???
? ??1
2
? ???? ?? ?? ?? ?? ??? ?? ??
How to compute ? = (?1, ´ , ? ?)?
Sequential Minimal Optimization
(??? ?? ???)
? ??? ??? ???, ?? ???? ??? ????.
$ ?? ???? ?? ??? ? ???, ????? ????.
$ ????? ??? ???? ?? ?? ?? ??, ?? ??? ??? ??? ?? ?
? ??? ??.
? ??? ??? ?? : ? = (?1, ´ , ? ?)? ???
? ???? ?? ?? : ??? ??, ??? ?? ???
? Platt? ??? ???? (???? simple version? ???.)
? ??? ????? Coordinate ascent? ????.
$ ??? ???? ????, ??? ??? ??? ????? ???? ?, ?? optimize
???.
Loop until convergence : {
For ? = 1, ´ , ?, {
?? ? arg max
??
?(?1, ´ , ???1, ???, ??+1, ´ , ? ?)
}
}
?
?=1
?
?? ?? = 0
???? 0?? ?? ? = (?1, ´ , ? ?) ??
(while) ?? ?? ?? ????? ?? ? ??
(for) ??, ? = 1, ´ , ? ? ?? ?? (???? ??? ??)
???? ?? ??? ??? ? ? ???
??? ?? ???? ?? ??? ??
??? ??? ?? (??? ??? ????? optimization???? ??)
??? ??? ? ? ??? next ? continue
??? ??? ? ? ??? ??, ?? ??? ??
???? ???? ??? ?? ??? ???, ?? ?? ?? 1 ?? ???.
?
?=1
?
?? ?? = 0
Go to Appendix 1
Go to Appendix 2
? ??, ??? ??
$ ??? ??? ? ? ?? ??
???? ?? ??? ???? ??? ? ?(?? )?, SVM?? ??(σ ?=1
?
?? ?? ??
?
?? + ?)
? ??? ?? ??? ??(tolerance) ??? ??
? ??? ??? random?? ??
? ??? ?? ??? ?? ???.
$ ??? ??? ??? ??? ?
? ?? ??? ??? ?? ??? ????.
$ ?????(????) ???? ??? ?? ???? ?? ???, ?? ??? ??
??? ?? ??? ?.
? ??(margin) ??? ??? ??? ???? ??? ????? ?? ????
???? ? ? ??? ??? ??? ???? ?
? ??? ??? ?? ??, ??? ???? ???? ?? ??? ?? ? ? ??
??? ?? ?? (????)
? SVM? ??? ??? ???.
? ???? - ??? ?
? http://cs229.stanford.edu/materials/smo.pdf
? http://cs229.stanford.edu/notes/cs229-notes3.pdf - Andrew Ng
? https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf
? Fast Training of Support Vector Machine using Sequential Minimal Optimization,
in Advances in Kernel Methods - Platt John
? Machine Learning in Action - ?? ???
? Machine Learning-A Probabilistic Perspective - Kevin P. Murphy
? 0 < ?? < ?? ????? ??? ??? ??? ??? ??? ????? ??.
$ ?? + ?? = ? (?? = ??)
 ? > ?
a. ? ? ? + ?? + ?
 ? < ?
a. 0 + ?? + ?
? = max(0, ?? + ?? ? ?), ? = min(?, ?? + ??)
$ ?? ? ?? = ? (?? 』 ??)
 ? > 0
a. 0 + ?? + ? ? ?
 ? < 0
a. ?? + ?? + ?
? = max(0, ?? ? ??), ? = min(?, ? + ?? ? ??)
?? ???
?? ???
? ? = ?
?=1
?
?? ?
1
2
?
?=1
?
?
?=1
?
?? ?? ?? ?? ??
?
??
??? ??? ????? ?? ??? ??? ??
?? ?? + ?? ?? = Const.
?? ?? ????? ???? ??? 2???? ??
1? ???, 2? ??? ??
From here!
?? ? ?? ?
?? ?? ? ??
?
?? = ?
?=1
?
?? ?? ??
?
?? + ? ? ??
? = 2??
?
?? ? ?? ?? ? ?? ??
?? ? ?
?
??
?
where
if ?? > ?
if ? + ?? + ?
if ?? < ?
??? ??
??
???
?? ???
back
?? ? ?? + ?? ??(??
???
? ??)
?1 = ? ? ?? ? ?? ?? ? ??
???
??
?
?? ? ?? ?? ? ??
???
??
?
??
?2 = ? ? ?? ? ?? ?? ? ??
???
??
?
?? ? ?? ?? ? ??
???
??
?
??
? ?
?1
?2
?1 + ?2
2
if 0 < ?? < ?
if 0 < ?? < ?
if otherwise
??
???
??? ??
??? ?
??, ? ???
back

More Related Content

What's hot (20)

[????] Graph Convolutional Network (GCN)
[????] Graph Convolutional Network (GCN)[????] Graph Convolutional Network (GCN)
[????] Graph Convolutional Network (GCN)
Donghyeon Kim
?
巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎
巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎
巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎
Kazuto Fukuchi
?
???? ? Trpo
???? ? Trpo???? ? Trpo
???? ? Trpo
Woong won Lee
?
永檎珂晦態i#6
永檎珂晦態i#6永檎珂晦態i#6
永檎珂晦態i#6
matsuolab
?
遺閣永檎2019iみ氏葵v叫遺閣
遺閣永檎2019iみ氏葵v叫遺閣遺閣永檎2019iみ氏葵v叫遺閣
遺閣永檎2019iみ氏葵v叫遺閣
Takanori Ogata
?
PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥
PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥
PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥
Preferred Networks
?
猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey
猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey
猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey
Toru Tamaki
?
1???? GAN(Generative Adversarial Network) ?? ????
1???? GAN(Generative Adversarial Network) ?? ????1???? GAN(Generative Adversarial Network) ?? ????
1???? GAN(Generative Adversarial Network) ?? ????
NAVER Engineering
?
皆閣珂について
皆閣珂について皆閣珂について
皆閣珂について
mknh1122
?
Support vector machines (svm)
Support vector machines (svm)Support vector machines (svm)
Support vector machines (svm)
Sharayu Patil
?
GAN with Mathematics
GAN with MathematicsGAN with Mathematics
GAN with Mathematics
Hyeongmin Lee
?
?? ???? SVM(?, ???? ????)
?? ???? SVM(?, ???? ????)?? ???? SVM(?, ???? ????)
?? ???? SVM(?, ???? ????)
SANG WON PARK
?
Lecture 9 Perceptron
Lecture 9 PerceptronLecture 9 Perceptron
Lecture 9 Perceptron
Marina Santini
?
PRML 及4嫗
PRML 及4嫗PRML 及4嫗
PRML 及4嫗
Akira Miyazawa
?
Positive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk EstimatorPositive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk Estimator
Kiryo Ryuichi
?
械返と篁返 及4嫗 除因隈による械返
械返と篁返 及4嫗 除因隈による械返械返と篁返 及4嫗 除因隈による械返
械返と篁返 及4嫗 除因隈による械返
Ken'ichi Matsui
?
パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹
パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹
パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹
Prunus 1350
?
2.2.ppt.SC
2.2.ppt.SC2.2.ppt.SC
2.2.ppt.SC
AMIT KUMAR
?
[????] Graph Convolutional Network (GCN)
[????] Graph Convolutional Network (GCN)[????] Graph Convolutional Network (GCN)
[????] Graph Convolutional Network (GCN)
Donghyeon Kim
?
巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎
巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎
巷峠來を隠^した粥鴛/字亠僥楼?アルゴリズムの恷仟尖胎
Kazuto Fukuchi
?
永檎珂晦態i#6
永檎珂晦態i#6永檎珂晦態i#6
永檎珂晦態i#6
matsuolab
?
遺閣永檎2019iみ氏葵v叫遺閣
遺閣永檎2019iみ氏葵v叫遺閣遺閣永檎2019iみ氏葵v叫遺閣
遺閣永檎2019iみ氏葵v叫遺閣
Takanori Ogata
?
PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥
PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥
PFI Seminar 2012/03/15 カ`ネルとハッシュのC亠僥
Preferred Networks
?
猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey
猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey
猟彌B初Learning From Noisy Labels With Deep Neural Networks: A Survey
Toru Tamaki
?
1???? GAN(Generative Adversarial Network) ?? ????
1???? GAN(Generative Adversarial Network) ?? ????1???? GAN(Generative Adversarial Network) ?? ????
1???? GAN(Generative Adversarial Network) ?? ????
NAVER Engineering
?
皆閣珂について
皆閣珂について皆閣珂について
皆閣珂について
mknh1122
?
Support vector machines (svm)
Support vector machines (svm)Support vector machines (svm)
Support vector machines (svm)
Sharayu Patil
?
?? ???? SVM(?, ???? ????)
?? ???? SVM(?, ???? ????)?? ???? SVM(?, ???? ????)
?? ???? SVM(?, ???? ????)
SANG WON PARK
?
Positive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk EstimatorPositive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk Estimator
Kiryo Ryuichi
?
械返と篁返 及4嫗 除因隈による械返
械返と篁返 及4嫗 除因隈による械返械返と篁返 及4嫗 除因隈による械返
械返と篁返 及4嫗 除因隈による械返
Ken'ichi Matsui
?
パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹
パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹
パタ`ンJRとC亠僥 ′6.2 カ`ネルv方の撹
Prunus 1350
?

Similar to SVM (20)

06. graph mining
06. graph mining06. graph mining
06. graph mining
Jeonghun Yoon
?
Neural network (perceptron)
Neural network (perceptron)Neural network (perceptron)
Neural network (perceptron)
Jeonghun Yoon
?
04. logistic regression ( ???? ?? )
04. logistic regression ( ???? ?? )04. logistic regression ( ???? ?? )
04. logistic regression ( ???? ?? )
Jeonghun Yoon
?
Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)
??? ???
?
Svmtf
SvmtfSvmtf
Svmtf
Lee Gyeong Hoon
?
Eigendecomposition and pca
Eigendecomposition and pcaEigendecomposition and pca
Eigendecomposition and pca
Jinhwan Suk
?
03. linear regression
03. linear regression03. linear regression
03. linear regression
Jeonghun Yoon
?
Linear algebra.pptx
Linear algebra.pptxLinear algebra.pptx
Linear algebra.pptx
GeonWooYoo1
?
0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue
Jeonghun Yoon
?
Vae
VaeVae
Vae
Lee Gyeong Hoon
?
Auto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-EncodersAuto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-Encoders
Jinho Lee
?
08. spectal clustering
08. spectal clustering08. spectal clustering
08. spectal clustering
Jeonghun Yoon
?
???? 08. ?? ?? (Linear Transformation)
???? 08. ?? ?? (Linear Transformation)???? 08. ?? ?? (Linear Transformation)
???? 08. ?? ?? (Linear Transformation)
AHRA CHO
?
?? ?? 2 classifiers based on bayes decision theory part 1
?? ?? 2 classifiers based on bayes decision theory part 1?? ?? 2 classifiers based on bayes decision theory part 1
?? ?? 2 classifiers based on bayes decision theory part 1
jdo
?
????-????????? ??? part1
????-????????? ??? part1????-????????? ??? part1
????-????????? ??? part1
jdo
?
Deep Learning from scratch 5? : backpropagation
 Deep Learning from scratch 5? : backpropagation Deep Learning from scratch 5? : backpropagation
Deep Learning from scratch 5? : backpropagation
JinSooKim80
?
0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vector0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vector
Jeonghun Yoon
?
Dsh data sensitive hashing for high dimensional k-nn search
Dsh  data sensitive hashing for high dimensional k-nn searchDsh  data sensitive hashing for high dimensional k-nn search
Dsh data sensitive hashing for high dimensional k-nn search
WooSung Choi
?
3 sat with randomization
3 sat with randomization3 sat with randomization
3 sat with randomization
Changki Yun
?
Neural network (perceptron)
Neural network (perceptron)Neural network (perceptron)
Neural network (perceptron)
Jeonghun Yoon
?
04. logistic regression ( ???? ?? )
04. logistic regression ( ???? ?? )04. logistic regression ( ???? ?? )
04. logistic regression ( ???? ?? )
Jeonghun Yoon
?
Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)
??? ???
?
Eigendecomposition and pca
Eigendecomposition and pcaEigendecomposition and pca
Eigendecomposition and pca
Jinhwan Suk
?
Linear algebra.pptx
Linear algebra.pptxLinear algebra.pptx
Linear algebra.pptx
GeonWooYoo1
?
0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue
Jeonghun Yoon
?
Auto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-EncodersAuto-Encoders and Variational Auto-Encoders
Auto-Encoders and Variational Auto-Encoders
Jinho Lee
?
???? 08. ?? ?? (Linear Transformation)
???? 08. ?? ?? (Linear Transformation)???? 08. ?? ?? (Linear Transformation)
???? 08. ?? ?? (Linear Transformation)
AHRA CHO
?
?? ?? 2 classifiers based on bayes decision theory part 1
?? ?? 2 classifiers based on bayes decision theory part 1?? ?? 2 classifiers based on bayes decision theory part 1
?? ?? 2 classifiers based on bayes decision theory part 1
jdo
?
????-????????? ??? part1
????-????????? ??? part1????-????????? ??? part1
????-????????? ??? part1
jdo
?
Deep Learning from scratch 5? : backpropagation
 Deep Learning from scratch 5? : backpropagation Deep Learning from scratch 5? : backpropagation
Deep Learning from scratch 5? : backpropagation
JinSooKim80
?
0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vector0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vector
Jeonghun Yoon
?
Dsh data sensitive hashing for high dimensional k-nn search
Dsh  data sensitive hashing for high dimensional k-nn searchDsh  data sensitive hashing for high dimensional k-nn search
Dsh data sensitive hashing for high dimensional k-nn search
WooSung Choi
?
3 sat with randomization
3 sat with randomization3 sat with randomization
3 sat with randomization
Changki Yun
?

More from Jeonghun Yoon (17)

Topic models
Topic modelsTopic models
Topic models
Jeonghun Yoon
?
0314 2 correlation
0314 2 correlation0314 2 correlation
0314 2 correlation
Jeonghun Yoon
?
0314 1 anova
0314 1 anova0314 1 anova
0314 1 anova
Jeonghun Yoon
?
0307 2 hypothesis_testing
0307 2 hypothesis_testing0307 2 hypothesis_testing
0307 2 hypothesis_testing
Jeonghun Yoon
?
0307 1 estimation_theory
0307 1 estimation_theory0307 1 estimation_theory
0307 1 estimation_theory
Jeonghun Yoon
?
0228 2 sample_distribution
0228 2 sample_distribution0228 2 sample_distribution
0228 2 sample_distribution
Jeonghun Yoon
?
0221 basic probability theory
0221 basic probability theory0221 basic probability theory
0221 basic probability theory
Jeonghun Yoon
?
0207 1 gradient
0207 1 gradient0207 1 gradient
0207 1 gradient
Jeonghun Yoon
?
0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation
Jeonghun Yoon
?
0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrix0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrix
Jeonghun Yoon
?
Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)
Jeonghun Yoon
?
Decision tree
Decision treeDecision tree
Decision tree
Jeonghun Yoon
?
Association rule mining
Association rule miningAssociation rule mining
Association rule mining
Jeonghun Yoon
?
07. PCA
07. PCA07. PCA
07. PCA
Jeonghun Yoon
?
05. k means clustering ( k-means ?????)
05. k means clustering ( k-means ?????)05. k means clustering ( k-means ?????)
05. k means clustering ( k-means ?????)
Jeonghun Yoon
?
02. naive bayes classifier revision
02. naive bayes classifier   revision02. naive bayes classifier   revision
02. naive bayes classifier revision
Jeonghun Yoon
?
01. introduction
01. introduction01. introduction
01. introduction
Jeonghun Yoon
?
0307 2 hypothesis_testing
0307 2 hypothesis_testing0307 2 hypothesis_testing
0307 2 hypothesis_testing
Jeonghun Yoon
?
0307 1 estimation_theory
0307 1 estimation_theory0307 1 estimation_theory
0307 1 estimation_theory
Jeonghun Yoon
?
0228 2 sample_distribution
0228 2 sample_distribution0228 2 sample_distribution
0228 2 sample_distribution
Jeonghun Yoon
?
0221 basic probability theory
0221 basic probability theory0221 basic probability theory
0221 basic probability theory
Jeonghun Yoon
?
0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation
Jeonghun Yoon
?
0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrix0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrix
Jeonghun Yoon
?
Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)
Jeonghun Yoon
?
Association rule mining
Association rule miningAssociation rule mining
Association rule mining
Jeonghun Yoon
?
05. k means clustering ( k-means ?????)
05. k means clustering ( k-means ?????)05. k means clustering ( k-means ?????)
05. k means clustering ( k-means ?????)
Jeonghun Yoon
?
02. naive bayes classifier revision
02. naive bayes classifier   revision02. naive bayes classifier   revision
02. naive bayes classifier revision
Jeonghun Yoon
?

SVM

  • 2. Classification (??) Supervised Learning ? | ? ★ ? Given samples ? = ( ?1, ?1 , ?2, ?2 , ´ , (? ?, ? ?)) find!
  • 4. Question 1) ?? ???(classifier)?? Question 2) ???? ?? ???? $ Bayesian Classifier : Error, Risk? minimize (Likelihood or MAP ????? ????)
  • 5. 1. ???? 2?? ??? point?? ?? : feature? 2? 2. ??? point ( ?1, ??? point ( ?2 ?? ?? ?1 ?2 ?1 ?2 ?? ?? ??? ???????
  • 6. ?1 ?2 ?1 ?2 ?1?? ???? ???? ?? ??? ?? ?? 2? ???? ???? ?? ??? ???? ???, ???? ????? ? ?? : Generalization (??? ??? ??? ??? ??? ? ??????)
  • 7. ?1 ?2 ?1 ?2 Generalization? ??? (???? ????? ??? ???? ??? ?? ??? ??.) ?? ??? ??? ??. ? ??(margin)? ?? ???, ??? ???.
  • 8. ? = ?1, ?2, ´ , ? ? ( ? ?, ? = ?1, ?2, ´ , ? ? ( ? ?, ? ( ? ? ? = ? ? ? + ? = 0 ? ?(?)? ?? ??? ? ???? ????. $ ?1? ? ? > 0? ?? $ ?2? ? ? < 0? ?? ? ??? ???? ???? ?? ?? ??. ? ? : normal vector(???? ??), ? : ???? ?? ? ??? ? ?1?? ?????? ?? ? = ? ? ? ? Decision Hyperplane ?1 ?2 ? ? = 0? ? > 0 ? ? < 0 ?? ??? (decision hyperplane)
  • 9. ? Constrained optimization problem (primal problem) $ ? ( ? ? is the optimization variable. $ ?0: ? ? ★ ? is the objective function or cost function. (?? ??) $ ??: ? ? ★ ?, ? = 1, ´ , ?, are inequality constraint functions. $ ??: ? ? ★ ?, ? = 1, ´ , ?, are equality constraint functions. $ optimal value ?? ?? = inf ?0 ? ?? ? + 0, ? = 1, ´ , ?, ?? ? = 0, ? = 1, ´ , ?} ??? ??? ?? minimize ?0(?) subject to ?? ? + 0 , ? = 1, ´ , ? ?? ? = 0 , ? = 1, ´ , ?
  • 10. ? Affine set $ ? ? ? ? is affine ★ ? ?? 2?? ?? ?? point? ??? line? ?? ?? ?. $ ?? ??, ?? or hyperplane ?? ??. ? Convex set $ ? ? ? ? is convex ★ ? ?? 2?? ?? ?? point? ??? line segment? ?? ?? ?. $ ?? ??, ? or ??? ?? ??. Affine / Convex convex set (???)convex set (??) line line segment
  • 11. ? Affine function $ a function composed of a linear function and constant (translation) $ in 1-dim : ? = ?? + ? $ in 2-dim : ? ?, ? = ?? + ?? + ? $ in 3-dim : ? ?, ?, ? = ?? + ?? + ?? + ? translation : a transformation consisting of a constant offset with no rotation or distortion Affine function
  • 12. ? ?: ? ? ★ ? is convex if ??? ? is convex and ? ?? + 1 ? ? ? + ?? ? + 1 ? ? ? ? for ??, ? ( ??? ?, 0 + ? + 1. $ ? is concave if ?? is convex. (?, ?(?)) (?, ?(?)) ?(?? + 1 ? ? ?) ?? + 1 ? ? ? ?? ? + 1 ? ? ? ? ? minimum ??? ? : ?? ?? ??? ?? ?? ??. ? ??? ?? define?? ?????? ?? ??. Convex function
  • 13. ? convex optimization problem $ ?0, ´ , ?? are convex. $ ?? ? = ?? ? ? ? ?? , ? = 1, ´ , ? are affine. $ The feasible set of a convex optimization problem is convex. Since ?1, ´ , ?? are convex, ????=1 ? ??? ?? is convex. Since ? ?? ? = ??} is hyperplane, ????=1 ? ? ?? ? = ??} is affine (i.e convex). $ In a convex optimization, we minimize a convex objective function over a convex set. convex optimization minimize ?0(?) subject to ?? ? + 0 , ? = 1, ´ , ? ?? ? ? = ?? , ? = 1, ´ , ?
  • 14. ? Lagrangian ?: ? ? 〜 ? ? 〜 ? ? ★ ?, ? ?, Λ, ? = ?? ? + ? ?=1 ? ?? ??(?) + ? ?=1 ? ????(?) with, ??? ? = ????=1 ? ??? ?? ” ????=1 ? ??? ?? 〜 ? ? 〜 ? ? $ ?? is Lagrange multiplier associated with ?? ? + 0 and ? = (? ?, ´ , ? ?) $ ?? is Lagrange multiplier associated with ?? ? = 0 and ? = (? ?, ´ , ? ?) Lagrangian
  • 15. ? Lagrange dual function ?: ? ? 〜 ? ? ★ ? ? Lagrange dual problem $ ?(Λ, ?) is concave and constraints are convex, so this is convex optimization problem. $ Lagrange dual problem? ?(Λ? , ?? )? primal problem(?? ) ?? lower bound? ?? ??. inf ?(?? , Λ? , ?? ) + ?0(?? ) ? Λ, ? = inf ?(? ?(?, Λ, ? ) = inf ?(? ?0 ? + ? ?=1 ? ?? ?? ? + ? ?=1 ? ???? ? Lagrange dual function / Lagrange dual problem maximize ?(Λ, ?) subject to Λ ? 0 How to make it coincide?
  • 16. ? If $ ?? are convex (????, inequality constraint) $ ?? are affine (equality constraint) $ ?? , Λ? , ?? satisfy KKT condition ? Then $ ?? is primal optimal and (Λ? , ?? ) is dual optimal with zero duality gap. $ ? ?? ?? ????. KKT condition and zero duality
  • 17. KKT conditions ?? ?> + 0, ? = 1, ´ , ? ?? ?> = 0, ? = 1, ´ , ? ?? > − 0, ? = 1, ´ , ? ?? > ?? ?> = 0, ? = 1, ´ , ? ??0 ?> + σ?=1 ? ?? > ???(?>) + σ?=1 ? ?? > ???(?>) = 0 primal constraints dual constraints complementary slackness gradient Lagrangian with respect to ? vanishes at ?>
  • 18. ? Wolfe duality problem $ ?0 is convex. $ ??, ?? are differentiable. (Lagrange dual problem ★ Wolfe duality problem) $ ????? KKT conditions? ?? ???? ?? ?????, ? ??? ?? ??? ?? primal problem? ?? ??? ?? ????. maximize ?0 ? + σ?=1 ? ?? ?? ? + σ?=1 ? ???? ? subject to Λ ? 0 ??0 ? + σ?=1 ? ?? > ???(?) + σ?=1 ? ?? > ???(?) = 0 Wolfe duality ?(?, Λ, ?)
  • 19. ? SVM? concept? ??(margin)?? ????. ? ? ??? ?? ??? ??(margin)? ??? ????? ????? ???. $ ??(margin) : ?? ???(??)???? ?? ??? ????? ??? 2? ?1 ?2 ?1 ?2 margin How to find the best margin? ?1 ?2 ?1 ?2 margin separation band separation band
  • 21. ?? ?? ??? ??
  • 22. ?1 ?2 ?1 ?2 separation band (?? ? ?? ???? ???? ?? ?)
  • 23. ? Problem : margin? ????? ????? ???. $ support vector, ? ?: ???????? ?? ??? sample $ margin? ?? = 2 ? ? ? ? = 2 ? (??? ???? rescale? ???. ??? 1? ??) $ ???? ? = { ?1, ?1 , ?2, ?2 , ´ , ? ?, ? ? } if ?? ( ?1, then ?? = 1 if ?? ( ?2, then ?? = ?1 ☆ ?? : ?? ??? ?? ????. ? ?? ??? ?? ?? ??? ????. maximize 2 ? subject to ? ? ?? + ? − 1 ??? ( ?1 ? ? ?? + ? + ?1 ??? ( ?2
  • 24. ? Primal problem (??? ??? ??) $ 2 ? ? ????? ??? ???? ? 2 2 ? ????? ??? ??? ? ??. ? ? = 1 2 ? 2 ? ? ? 2???? ???? ?? ??? convex ????. inequality constrain? ?? ???? ??? convex ????. inequality constrain? ????? ??(feasible)? convex set??. $ Primal problem? convex optimization problem??. $ Primal problem? ?? global solution? ??. minimize ? ? = ? ? ? ? subject to ?? ? ? ?? + ? − ? , ? = ?, ´ , ?
  • 25. $ Primal problem? ??? ?? ??? ???? ???. Primal problem Lagrange dual problem Wolfe dual problem ??? ??? ?? - Lagrangian ?? - Lagrange dual function ?? - Objective(Cost) function : convex - constraints are differentiable.
  • 26. ? Lagrangian of primal problem $ ? = ?1, ´ , ? ? ? ? Lagrange multiplier?? ??. ?? − 0 for ? = 1, ´ , ? ? ?, ?, ? = 1 2 ? 2 ? ? ?=1 ? ?? ?? ? ? ?? + ? ? 1 ? Lagrange dual function of primal problem ? ? = inf ?,? ?(?, ?, ?) = inf ?,? 1 2 ? 2 ? ? ?=1 ? ?? ?? ? ? ?? + ? ? 1 ? Lagrange dual problem of primal problem maximize ? ? = inf ?,? ?(?, ?, ?) subject to ? ? 0
  • 27. ? Wolfe dual problem $ ???? 1 2 ? 2 ? convex ????. $ ????? ?????? ?? ?? ????. maximize ? ?, ?, ? = 1 2 ? 2 ? σ?=1 ? ?? ?? ? ? ?? + ? ? 1 subject to ? ? 0, ?? ?? = 0, ?? ?? = 0 ?? − 0, ? = 1, ´ , ? ? = ? ?=1 ? ?? ?? ?? ? ?=1 ? ?? ?? = 0 maximize ? ? = σ?=1 ? ?? ? 1 2 σ?=1 ? σ ?=1 ? ?? ?? ?? ?? ?? ? ?? subject to ?? − 0, ? = 1, ´ , ? σ?=1 ? ?? ?? = 0
  • 28. ? ? ?? ?? ??? ??? ??? ??? ?? 2?(quadratic) ?? ??? ?? ? ?? ? ?, ?? ??? ??? ??, Lagrange multiplier ?? ??? ??? ??? ? ?? ???? ?? ?? ??? ?? ???? ??, ? ?? ?? ??? ?? ?? ? ???? ??? ? ?2? ?? ???? ? maximize ? ? = σ?=1 ? ?? ? 1 2 σ?=1 ? σ ?=1 ? ?? ?? ?? ?? ?? ? ?? subject to ?? − 0, ? = 1, ´ , ? σ?=1 ? ?? ?? = 0
  • 29. ?? ?? ???? ?? (Soft margin)
  • 30. ?1 ?2 ?1 ?2 separation band (?? ? ?? ???? ?????, ????? ??? ??)
  • 31. ?1 ?2 ?1 ?2 separation band ?? ?? ??? ???(support vector), ?? ?? ??? ??. ? ? + ?(? ? ? + ?) ?? ?? ??? ??, ??? ?? ??? ??? ??. ? ? + ? ? ? ? + ? < ? ?? ??? ?? ??? ??? ?? ??? ??? ??. ? ? ? ? ? + ? < ?
  • 32. ?1 ?2 ?1 ?2 separation band ? + ?(? ? ? + ?) ? ? = 0 ? + ? ? ? ? + ? < ? ? 0 < ? + 1 ? ? ? ? + ? < ? ? ? > 1 slack ?? ?? ????, 3?? ???, ??? ??? ?? ? ? ? ? + ? − ? ? ?
  • 33. ?1 ?2 ?1 ?2 separation band ??? ???? ? ??? ?? 2?? ??? ????? ??. - ?? 1 : margin? ??? ??? ??. - ?? 2 : , ??? ???? ??? ?? ????? ??? ??.
  • 34. ?1 ?2 ?1 ?2 2??? ??? ?? ????? ??? ?? ????? ??. Ξ = (?1, ´ , ? ?)?? ??. ? ?, Ξ = 1 2 ? 2 + ? ? ?=1 ? ?? ? ?? ??? ?? ?? ??? ??? ???? ?? ??. ? = 0?? ??2? ????. ? = ±?? ?? 2? ????. ?1 ?2 ?1 ?2 ? = ±? = 0
  • 35. ? ?, Ξ = 1 2 ? 2 + ? ? ?=1 ? ?? ??? ?? ??? ????? ??. minimize ? ? = ? ? ? ? + ? σ?=? ? ?? subject to ?? ? ? ?? + ? − ? ? ?? , ? = ?, ´ , ? ?? − ?, ? = ?, ´ , ? ????? ??????, ??? ??? ??? ??? ? ??. ? Primal problem (?? ?? ???? ??) $ ???? ?(?)? convex????. $ ??? ?? ??????.
  • 36. ? Lagrangian ? ?, ?, Ξ, ?, ? = 1 2 ? 2 + ? ? ?=1 ? ?? ? ? ?=1 ? ?? ?? ? ? ?? + ? ? 1 + ?? + ? ?=1 ? ?? ?? $ ? = (?1, ´ , ? ?), ? = (?1, ´ , ? ?), Ξ = (?1, ´ , ? ?) ? Wolfe dual problem maximize ? ?, ?, Ξ, ?, ? = 1 2 ? 2 + ? σ?=1 ? ?? ? σ?=1 ? ?? ?? ? ? ?? + ? ? 1 + ?? + σ?=1 ? ?? ?? subject to ? ? 0, ? ? 0, ?? ?? = 0, ?? ?? = 0, ?? ?Ξ = 0 ?? − 0, ? = 1, ´ , ? ?? − 0, ? = 1, ´ , ? ? = ? ?=1 ? ?? ?? ?? ? ?=1 ? ?? ?? = 0 ? = ?? + ??
  • 37. ? Wolfe dual problem $ soft margin ??? ??? ???? ?? ??? ? ?? ??? ?? ?? = 0 : ???? support vector???, margin ???? ??. 0 < ?? < ? : ???? support vector ?? = ? : ???? support vector???, margin ??? ??. maximize ? ? = σ?=? ? ?? ? ? ? σ?=? ? σ?=? ? ?? ?? ?? ?? ?? ? ?? subject to σ?=? ? ?? ?? = ? ? + ?? + ?, ? = ?, ´ , ?
  • 38. (Proof) $ ??? ???? KKT ??? ????. ? = ?? + ?? ?? ?? = 0 ?? ?? ? ? ?? + ? ? 1 ? ?? = 0 ∠ ?? − 0 $ ?? = ? ?? = 0, ?? − 0 ?? ? ? ?? + ? ? 1 ? ?? = 0 ? ?? ? ? ?? + ? + 1 $ ?? = 0 ?? = ?, ?? = 0 ?? ? ? ?? + ? ? 1 ? ?? − 0 ? ?? ? ? ?? + ? − 1 $ 0 < ?? < ? 0 < ?? < ?, ?? = 0 ?? ? ? ?? + ? ? 1 ? ?? = 0 ? ?? ? ? ?? + ? = 1
  • 40. ? ?? ???? ???? ?? ????? ?? ???? ?? ??? ???? ? ? ???? ??. ? ?? ?? ????? ?? ?? ???? ??? ? ??? ? ?? ??? ?? ? ???? ???? ?? ?? ???? ?? ? ??. ?? ?? : ?? ?? ??? ?1 ?2 ?4?3 Φ: ? ★ ? ??? ?? : ?? ?? ?? ?1 ?4 ?3 ?2Φ ?? = ??
  • 41. ? ?? ??? ?? ??? ?? ?? Φ: ? ★ ? $ ??, ?? ?? ??? ??? ?? ??. ? ?? ??(Kernel function) $ ? ?? ?, ? ( ? $ ? ?? Φ ? , Φ(?) ( ? $ ?? ?: ? 〜 ? ★ ?(????) ? ?, ? = ? ? ? ?(?) $ ?? ??? ?? ??? ? ??? ??? ?? ??? ??.
  • 42. ? = ?1, ?2 ?, ? = ?1, ?2 ? , ?, ? ( ? ? ?, ? = ? ? ? 2 = ?1 2 ?1 2 + 2?1 ?2 ?1 ?2 + ?2 2 ?2 2 Φ ? = ?1 2 , 2?1 ?2, ?2 2 ( ? ? ?, ? = ? ? ? 2 = ?1 2 ?1 2 + 2?1 ?2 ?1 ?2 + ?2 2 ?2 2 = ?1 2 , 2?1 ?2, ?2 2 ?1 2 , 2?1 ?2, ?2 2 = Φ ? ? Φ(?) ?, ???? ?? ?? ????. Example example )
  • 43. ? Kernel substitution $ Kernel trick???? ??. $ ?? ??? ??? ??? ???? ?? ?, ? ??? ?? ??? ???? ??? ? ????. $ ?? ??? ????? ?? ?? ?? ???? ?????. ??? ???? Φ? ? ?? ??? ?? ??? ???? ??? ???. $ ??? ??? ???? ???. $ ?? ??? ???? ??? ? ??.
  • 44. ? ?? ???? ?? ?? ?? ??? ?? ??? ???? ???? ????? ???? ?? ?? ?? Φ? ? ?? ??? ( ?, ?? ??? ? ???) ??? ?? ?? ???? ??? ?? ? ?? ???? SVM ???? ??? ????? ?? ? ? = ? ?=1 ? ?? ? 1 2 ? ?=1 ? ? ?=1 ? ?? ?? ?? ?? ?? ? ?? $ ?1, ?2 ( ?, ? = (?1, ´ , ? ?) ? ?? ?? ????, SVM ???? ??? ????? ?? ? ? = ? ?=1 ? ?? ? 1 2 ? ?=1 ? ? ?=1 ? ?? ?? ?? ??Φ ?? ? Φ(??) $ Φ ?1 , Φ ?2 ( ? $ ???? ( ? ? ?=1 ? ?? ? 1 2 ? ?=1 ? ? ?=1 ? ?? ?? ?? ?? ?(?, ?) ?? ??? ???? ?? ??? ?? ???? ?? ??? ?? ?????? ???, ????? ???? ????? ??. ?????? ???? ???? ??
  • 45. ? ??? ?? ? ?, ? = ? ? ? + 1 ? ? Radial Basis Function ?? ? ?, ? = ? ? ??? 2 2?2 ? ????? ??? ?? ? ?, ? = tanh(?? ? ? + ?) $ ?? ?, ?? ??? ????? ????? ???. ? = 2, ? = 1? ??? ???.
  • 46. ? 1? M-1?? $ ??? ?? ???? ?? ??? ?? ???? ?? ??? ??? ? ? 1? ??? ?? ??? ??? ??? ?? ??, ??? ??? ??? ?? ???? ?? $ ?? ??? ??? ?? ?? ? ??? ?? ? = arg max ? ??(?) ? 1? 1?? $ ?? ?? ???? ?? ???? ? ??1 2 ? ?? ???(?)? ??? ??? ???? ?? ???? ?? ??? ?? ??? ???(?)? ??? ???? ?? ??? ??, ??? ??? ??? ?? 2? ??? ? ??1 2 ? ???? ?? ?? ?? ?? ??? ?? ??
  • 47. How to compute ? = (?1, ´ , ? ?)? Sequential Minimal Optimization (??? ?? ???)
  • 48. ? ??? ??? ???, ?? ???? ??? ????. $ ?? ???? ?? ??? ? ???, ????? ????. $ ????? ??? ???? ?? ?? ?? ??, ?? ??? ??? ??? ?? ? ? ??? ??. ? ??? ??? ?? : ? = (?1, ´ , ? ?)? ??? ? ???? ?? ?? : ??? ??, ??? ?? ???
  • 49. ? Platt? ??? ???? (???? simple version? ???.) ? ??? ????? Coordinate ascent? ????. $ ??? ???? ????, ??? ??? ??? ????? ???? ?, ?? optimize ???. Loop until convergence : { For ? = 1, ´ , ?, { ?? ? arg max ?? ?(?1, ´ , ???1, ???, ??+1, ´ , ? ?) } } ? ?=1 ? ?? ?? = 0
  • 50. ???? 0?? ?? ? = (?1, ´ , ? ?) ?? (while) ?? ?? ?? ????? ?? ? ?? (for) ??, ? = 1, ´ , ? ? ?? ?? (???? ??? ??) ???? ?? ??? ??? ? ? ??? ??? ?? ???? ?? ??? ?? ??? ??? ?? (??? ??? ????? optimization???? ??) ??? ??? ? ? ??? next ? continue ??? ??? ? ? ??? ??, ?? ??? ?? ???? ???? ??? ?? ??? ???, ?? ?? ?? 1 ?? ???. ? ?=1 ? ?? ?? = 0 Go to Appendix 1 Go to Appendix 2
  • 51. ? ??, ??? ?? $ ??? ??? ? ? ?? ?? ???? ?? ??? ???? ??? ? ?(?? )?, SVM?? ??(σ ?=1 ? ?? ?? ?? ? ?? + ?) ? ??? ?? ??? ??(tolerance) ??? ?? ? ??? ??? random?? ?? ? ??? ?? ??? ?? ???. $ ??? ??? ??? ??? ? ? ?? ??? ??? ?? ??? ????. $ ?????(????) ???? ??? ?? ???? ?? ???, ?? ??? ?? ??? ?? ??? ?.
  • 52. ? ??(margin) ??? ??? ??? ???? ??? ????? ?? ???? ???? ? ? ??? ??? ??? ???? ? ? ??? ??? ?? ??, ??? ???? ???? ?? ??? ?? ? ? ?? ??? ?? ?? (????) ? SVM? ??? ??? ???.
  • 53. ? ???? - ??? ? ? http://cs229.stanford.edu/materials/smo.pdf ? http://cs229.stanford.edu/notes/cs229-notes3.pdf - Andrew Ng ? https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf ? Fast Training of Support Vector Machine using Sequential Minimal Optimization, in Advances in Kernel Methods - Platt John ? Machine Learning in Action - ?? ??? ? Machine Learning-A Probabilistic Perspective - Kevin P. Murphy
  • 54. ? 0 < ?? < ?? ????? ??? ??? ??? ??? ??? ????? ??. $ ?? + ?? = ? (?? = ??) ? > ? a. ? ? ? + ?? + ? ? < ? a. 0 + ?? + ? ? = max(0, ?? + ?? ? ?), ? = min(?, ?? + ??) $ ?? ? ?? = ? (?? 』 ??) ? > 0 a. 0 + ?? + ? ? ? ? < 0 a. ?? + ?? + ? ? = max(0, ?? ? ??), ? = min(?, ? + ?? ? ??) ?? ???
  • 55. ?? ??? ? ? = ? ?=1 ? ?? ? 1 2 ? ?=1 ? ? ?=1 ? ?? ?? ?? ?? ?? ? ?? ??? ??? ????? ?? ??? ??? ?? ?? ?? + ?? ?? = Const. ?? ?? ????? ???? ??? 2???? ?? 1? ???, 2? ??? ?? From here!
  • 56. ?? ? ?? ? ?? ?? ? ?? ? ?? = ? ?=1 ? ?? ?? ?? ? ?? + ? ? ?? ? = 2?? ? ?? ? ?? ?? ? ?? ?? ?? ? ? ? ?? ? where if ?? > ? if ? + ?? + ? if ?? < ? ??? ?? ?? ??? ?? ??? back
  • 57. ?? ? ?? + ?? ??(?? ??? ? ??) ?1 = ? ? ?? ? ?? ?? ? ?? ??? ?? ? ?? ? ?? ?? ? ?? ??? ?? ? ?? ?2 = ? ? ?? ? ?? ?? ? ?? ??? ?? ? ?? ? ?? ?? ? ?? ??? ?? ? ?? ? ? ?1 ?2 ?1 + ?2 2 if 0 < ?? < ? if 0 < ?? < ? if otherwise ?? ??? ??? ?? ??? ? ??, ? ??? back