Next: B.5 Examples
Up: B.4 Learners
Previous: B.4.7 super
Contents
B.4.8 svm
This is an implementation of a support vector machine (SVM)
classifier. We didn't actually implement our own SVM, but
embedded
SVM
[18] in the software.
SVM is a novel type of learning machine which tries to find the largest
margin linear classifier. Vapnik [42] shows how
training a support
vector machine leads to the following quadratic optimization problem:
 |
(B.10) |
The number of training examples is denoted by
.
is a vector
of
variables,
where each component
corresponds to a training example
.
The solution of Problem
is the vector
for
which
is minimized and the constraints are satisfied.
Defining the matrix Q as
, this can
equivalently be written as
 |
(B.11) |
Two good tutorials for SVM are [29] and
[3].
| Keyword |
Arg Type |
Arg Vals |
Default |
| Common |
| capacity |
float |
[1e-10, ) |
10.0 |
| cost |
float |
[1e-10, 1e+10] |
1.0 |
| gamma |
float |
(0, ) |
0.002 |
| kernel |
int |
0, 2 |
0 |
| svmdir |
path |
|
./ |
| usedefcapacity |
none |
|
|
| usedefgamma |
none |
|
|
| Rare |
| learn |
filename |
|
svm_learn |
| classify |
filename |
|
svm_classify |
| example |
filename |
|
svm_example |
| model |
filename |
|
svm_model |
| result |
filename |
|
svm_result |
|
|
|
|
Common keywords and arguments:
- capacity float: This corresponds to the
-c option for svm_learn . From the
SVM
command-line help:
C: trade-off between training error and margin (default
avg.
)
If you would like to use the
SVM
default value, please
see the usedefcapacity argument, below.
- cost float: This corresponds to the -j option
for svm_learn . From the
SVM
command-line help:
Cost: cost-factor, by which training errors on positive
examples outweigh errors on negative examples (default 1)
(see K. Morik, P. Brockhausen, and T. Joachims, Combining
statistical learning with a knowledge-based approach - A case
study in intensive care monitoring. International Conference
on Machine Learning (ICML), 1999.
- gamma float: This corresponds to the
-g option for svm_learn . From the
SVM
command-line help:
parameter gamma in rbf kernel
If you would like to use the
SVM
default value, please
see the usedefgamma argument, below.
- kernel int: This corresponds to the
-k option for svm_learn . From the
SVM
command-line help:
type of kernel function:
- 1:
- linear (default)
- 2:
- polynomial
- 3:
- radial basis function
- 4:
- sigmoid
- 5:
- user defined kernel from kernel.h
Note that at present we only support linear and radial basis function
kernels; additional kernels from the list above will be supported upon
request.
- svmdir path: This option specifies the
directory in which the
SVM
executables can be found.
If the learn or classify options are set,
their values are appended to the value of svmdir
- usedefcapacity none: If you specify this option,
the default capacity of
SVM
will be used in place of this
program's default.
- usedefgamma none: If you specify this option,
the default gamma of
SVM
will be used in place of this
program's default.
Rare keywords and arguments:
- classify filename: This allows specification
of the svm_classify executable name. The value of
classify will be appended to the value of
svmdir (path separators are inserted as necessary).
- example filename: This allows specification
of the svm_example executable name. The value of
example will be appended to the value of
svmdir (path separators are inserted as necessary).
- learn filename: This allows specification
of the svm_learn executable name. The value of
learn will be appended to the value of
svmdir (path separators are inserted as necessary).
- model filename: This allows specification
of the svm_classify executable name. The value of
model will be appended to the value of
svmdir (path separators are inserted as necessary).
- result filename: This allows specification
of the svm_classify executable name. The value of
result will be appended to the value of
svmdir (path separators are inserted as necessary).
Next: B.5 Examples
Up: B.4 Learners
Previous: B.4.7 super
Contents
Copyright 2004 Paul Komarek, komarek@cmu.edu