svmocas - train a binary linear SVM classifier
Contents
Description
svmocas is a program that trains a binary linear SVM classifier using the Optimized Cutting Plane
Algorithm for Support Vector Machines (OCAS) and produces a model file.
example_file is a file with training examples in SVM^light format, and model_file is the file in which to
store the learned linear rule f(x)=w'*x+w0. model_file contains d lines, where d is the number of data
dimensions. The first n lines are coordinates of w and the last line is w0.
Examples
Train the binary SVM classifier from riply_trn.light, with the regularization constant C=10, bias
switched on, verbosity switched off, and save model to svmocas.model:
svmocas -c 10 -b 1 -v 0 riply_trn.light svmocas.model
Compute the testing error of the classifier stored in svmocas.model with linclassif(1) using testing
examples from riply_tst.light and save the predicted labels to riply_tst.pred:
linclassif -e -o riply_tst.pred riply_tst.light svmocas.model
Name
svmocas - train a binary linear SVM classifier
Options
A summary of options is included below.
Generaloptions:-h Show summary of options.
-v(0|1)
Set the verbosity level (default: 1)
Learningoptions:-cfloat
Regularization constant C. (default: 1)
-Cconstants_file
If specified, each example has a different regularization constant, taken from the text file
constants_file. Each line of the text file must contain a single constant (positive double) for
the corresponding example. If -C is used, then the -c option is ignored.
-b(0|1)
Value of the L2-bias feature. A value of 0 implies not having bias. (default: 0)
-ninteger
Use only the first integer examples for training. By default, integer equals the number of
examples in example_file.
Optimizationoptions:-m(0|1)
Solver to be used:
0 ... standard cutting plane (equivalent to BMRM, SVM^perf)
1 ... OCAS (default)
-sinteger
Cache size for cutting planes. (default: 2000)
-pinteger
Number of threads. (default: 1)
Stoppingconditions:-afloat
Absolute tolerance TolAbs: halt if QP-QD<=TolAbs. (default: 0)
-rfloat
Relative tolerance TolAbs: halt if QP-QD<=abs(QP)*TolRel. (default: 0.01)
-qfloat
Desired objective value QPValue: halt is QP<=QPValue. (default: 0)
-tfloat
Halts if the solver time (loading time is not counted) exceeds the time given in seconds.
(default: infinity)
See Also
msvmocas(1), linclassif(1).
Synopsis
svmocas [options] example_filemodel_file
