SVMQUADPROG |
SVM trained by Matlab Optimization Toolbox.
Synopsis:
model = svmquadprog( data )
model = svmquadprog( data, options )
Description:
This function trains binary Support Vector Machines classifer
with L1 or L2-soft margin. The SVM quadratic programming task
is solved by the 'quadprog.m' of the Matlab Optimization toolbox.
See 'help svmclass' to see how to classify data with found classifier.
Input:
data [struct] Binary labeled training data:
.X [dim x num_data] Vectors.
.y [1 x num_data] Training labels.
options [struct] Control parameters:
.ker [string] Kernel identifier (default 'linear').
See 'help kernel' for more info.
.arg [1 x nargs] Kernel argument(s).
.C SVM regularization constant (default inf):
[1 x 1] .. the same for all training vectors.
[1 x 2] .. for each class separately C=[C1,C2],
[1 x num_data] .. each training vector separately.
.norm [1x1] 1 .. L1-soft margin penalization (default).
2 .. L2-soft margin penalization.
Output:
model [struct] Binary SVM classifier:
.Alpha [nsv x 1] Weights.
.b [1x1] Bias of the decision function.
.sv.X [dim x nsv] Support vectors.
.nsv [1x1] Number of support vectors.
.kercnt [1x1] Number of used kernel evaluations.
.trnerr [1x1] Training classification error.
.margin [1x1] Margin of found classifier.
.cputime [1x1] Used CPU time in seconds.
.options [struct] Copy of used options.
.exitflag [1x1] Exitflag of the QUADPROG function.
(if > 0 then it has converged to the solution).
Example:
data = load('riply_trn');
options = struct('ker','rbf','arg',1,'C',10);
model = svmquadprog(data,options)
figure; ppatterns(data); psvm(model);
See also
SMO, SVMLIGHT, SVMCLASS.
About: Statistical Pattern Recognition Toolbox
(C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac
Czech Technical University Prague
Faculty of Electrical Engineering
Center for Machine Perception
Modifications:
31-may-2004, VF
16-may-2004, VF
17-Feb-2003, VF
28-Nov-2001, VF, used quadprog instead of qp
23-Occt-2001, VF
19-September-2001, V. Franc, renamed to svmmot.
8-July-2001, V.Franc, comments changed, bias mistake removed.
28-April-2001, V.Franc, flps counter added
10-April-2001, V. Franc, created