Use of penalty multiplier C (boxconstraint) in svmtrain
Show older comments
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
Accepted Answer
More Answers (1)
Ilya
on 3 Dec 2012
0 votes
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.
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!