Use of penalty multiplier C (boxconstraint) in svmtrain
Ältere Kommentare anzeigen
I looked up the code of svmtrain. If the algorithm is QP, it uses
[alpha, ~, exitflag, output] = quadprog(H,-ones(nPoints,1),[],[],...
groupIndex',0,zeros(nPoints,1), Inf *ones(nPoints,1),...
X0, qp_opts)
So this means that there is no upper bound on alphas.
It takes into account the boxconstraint in this fashion:
kx = feval(kfun,training,training,kfunargs{:});
% ensure function is symmetric
kx = (kx+kx')/2 + diag(1./boxconstraint);
H =((groupIndex * groupIndex').*kx);
I am unable to understand how does this enforce the box constraints:
0 < alphai < C
Thanks
Akzeptierte Antwort
Weitere Antworten (1)
Ilya
am 3 Dez. 2012
0 Stimmen
Off hand I cannot think of a reason why you couldn't use quadprog to solve the 1-norm problem. I don't know why the 2-norm solution was chosen for svmtrain. The svmtrain implementation is relatvely old. The fast 'interior-point-convex' algorithm for quadprog was introduced in 11a, years after svmtrain was coded. Whatever reasons motivated this choice for svmtrain may not hold anymore.
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!