Some time ago ready to practice medicine, senior sister apprentice brothers the respondent to take pictures, look for internships. Blog and behind. Continue continue ing ~
Immediately on an SVM , in terms of SMO, SMO SVM is the hardest nut to place it, to see a big push formula.
I am in eliminating the most tedious derivation formula for everyone as far as possible, then the employer SMO clarifying the truth.
First of all, one, we get the final optimization goals:
$\underset{a}{min}=\frac{1}{2}\sum \sum a_{i}a_{j}y_{i}y_{j}\mathbf{K}(x_{i},x_{j})-\sum a_{i}$
$s.t \sum a_{i}y_{i}=0$
$0\leqslant \alpha _{i}\leqslant C$
Now patch the hole.
SMO only two unknown parameters once optimized $ \ alpha _ {1} $, $ \ alpha _ {2} $, the other $ \ alpha _ {i> 2} $ co-N-2 fixed parameters, to solve the original N a parametric quadratic programming problem into many sub-quadratic programming problems are solved, each sub-problem to be solved only two parameters, the method is similar to coordinate the rise.
The first constraint $ \ sum a_ {i} y_ {i} = 0 $, fixed $ \ alpha _ {1} $, $ \ alpha _ {2} $, as the other parameters constant.
Have
(I and j are taken 1, 2, but there is only kernel movable j, I is known, non-movable) ( 0 )
There $ \ alpha _ {1} y_ {1} + \ alpha _ {2} y_ {2} = The constraint - \ SUM _ {J =. 3} ^ {N} Y_ {J} = \ Zeta $ ( . 1 )
From (1) to give
(The same on both sides of the equation multiplied by Y . 1 , and Y_ {I} ^ $ {2} = $. 1) ( 2 )
Suppose we iteration and obtained on a $ \ alpha _ {1} ^ {old} $, $ \ alpha _ {2} ^ {old} $, $ next iteration and obtained \ alpha _ {1} ^ {new } $, $ \ alpha _ {1} ^ {new} $
Definition of a function, in order to simplify formulas rear (similar loss function, the hyperplane g (x) as a prediction value, Y I as the true value)
(3)
make
(Also for simplified formula) (hyperplane corresponding to g (x) removing $ \ alpha _ {1} $ , $ \ alpha _ {2} $ section) ( 4 )
Preparatory work done, I said the simplified formula in this. (First seek assuming alpha] 2, can be obtained by the formula 2 alpha] l) Equation 2,3,4 0 into Equation, there
Obtained $ \ alpha _ {2} ^ {new, unclipped} $
tips
With this, we have a question, this what untrimmed $ \ alpha _ {2} $ What the hell?
In fact, without the constraints, find out directly $ \ alpha _ {2} $ thing.
Add the following constraints.
The availability constraint equations 1 and $ 0 \ leqslant \ alpha _ {i} \ leqslant C $
You can manually set $ \ alpha _ {1} y_ {1} + \ alpha _ {2} y_ {2} = - \ sum _ {j = 3} ^ {N} y_ {j} = \ zeta $ ( 1) equals example 3, C = 5, y1 ≠ y2
The figure is calculated blogger I hand, SMO for understanding a description of FIG helpful
(a)
When the figure is left, there is
When the figure is right, there
Finally there is $ \ alpha _ {2} ^ {new, unclipped} $ relationship and $ \ alpha _ {2} ^ {new} $ is
This, we like to sum up, the optimization goals in the a1, a2 look at the most unknown, others have a known
By optimization goal derivative, which is reduced, deformation, obtained $ \ alpha _ {2} ^ {new, unclipped} $
再根据约束条件,得到$\alpha _{2}^{new,unclipped}$和$\alpha _{2}^{new}$的关系,即得到了$\alpha _{2}^{new}$
再根据公式1,得到$\alpha _{1}^{new}$。
参考:
https://www.cnblogs.com/pinard/p/6111471.html
https://blog.csdn.net/luoshixian099/article/details/51227754