Detailed Description
A generic Support Vector Machine Interface.
A support vector machine is defined as
where
is the number of training examples
are the weights assigned to each training example
is the kernel and
the bias.
Using an a-priori choosen kernel, the
and bias are determined by solving the following quadratic program
here C is a pre-specified regularization parameter.
Definition at line 46 of file SVM.h.
List of all members.
Constructor & Destructor Documentation
CSVM |
( |
int32_t |
num_sv = 0 |
) |
|
Create an empty Support Vector Machine Object
- Parameters:
-
| num_sv | with num_sv support vectors |
Definition at line 27 of file SVM.cpp.
Create a Support Vector Machine Object from a trained SVM
- Parameters:
-
| C | the C parameter |
| k | the Kernel object |
| lab | the Label object |
Definition at line 33 of file SVM.cpp.
Member Function Documentation
compute svm dual objective
- Returns:
- computed dual objective
Definition at line 242 of file SVM.cpp.
compute svm primal objective
- Returns:
- computed svm primal objective
Definition at line 267 of file SVM.cpp.
get C1
- Returns:
- C1
Definition at line 153 of file SVM.h.
get C2
- Returns:
- C2
Definition at line 159 of file SVM.h.
get epsilon
- Returns:
- epsilon
Definition at line 141 of file SVM.h.
get linear term
- Returns:
- the linear term
Definition at line 337 of file SVM.cpp.
float64_t * get_linear_term_array |
( |
|
) |
[protected, virtual] |
get linear term copy as dynamic array
- Returns:
- linear term copied to a dynamic array
Definition at line 302 of file SVM.cpp.
virtual const char* get_name |
( |
void |
|
) |
const [virtual] |
- Returns:
- object name
Reimplemented from CKernelMachine.
Reimplemented in CMKL, CDomainAdaptationSVM, CGMNPSVM, CGNPPSVM, CGPBTSVM, CLaRank, CLibSVM, CLibSVMMultiClass, CLibSVMOneClass, CMPDSVM, CScatterSVM, CSVMLight, CLibSVR, and CSVRLight.
Definition at line 226 of file SVM.h.
get nu
- Returns:
- nu
Definition at line 147 of file SVM.h.
get objective
- Returns:
- objective
Definition at line 210 of file SVM.h.
get qpsize
- Returns:
- qpsize
Definition at line 165 of file SVM.h.
bool get_shrinking_enabled |
( |
|
) |
|
get state of shrinking
- Returns:
- if shrinking is enabled
Definition at line 180 of file SVM.h.
get tube epsilon
- Returns:
- tube epsilon
Definition at line 129 of file SVM.h.
bool load |
( |
FILE * |
svm_file |
) |
[virtual] |
bool save |
( |
FILE * |
svm_file |
) |
[virtual] |
set C
- Parameters:
-
| c_neg | new C constant for negatively labeled examples |
| c_pos | new C constant for positively labeled examples |
Note that not all SVMs support this (however at least CLibSVM and CSVMLight do)
Definition at line 110 of file SVM.h.
set callback function svm optimizers may call when they have a new (small) set of alphas
- Parameters:
-
| m | pointer to mkl object |
| cb | callback function |
Definition at line 232 of file SVM.cpp.
void set_defaults |
( |
int32_t |
num_sv = 0 |
) |
|
set default values for members a SVM object
Definition at line 48 of file SVM.cpp.
set epsilon
- Parameters:
-
Definition at line 117 of file SVM.h.
set linear term of the QP
- Parameters:
-
| linear_term | the linear term |
Definition at line 314 of file SVM.cpp.
set nu
- Parameters:
-
Definition at line 99 of file SVM.h.
set objective
- Parameters:
-
Definition at line 201 of file SVM.h.
void set_qpsize |
( |
int32_t |
qps |
) |
|
set qpsize
- Parameters:
-
Definition at line 135 of file SVM.h.
void set_shrinking_enabled |
( |
bool |
enable |
) |
|
set state of shrinking
- Parameters:
-
| enable | if shrinking will be enabled |
Definition at line 171 of file SVM.h.
set tube epsilon
- Parameters:
-
Definition at line 123 of file SVM.h.
Member Data Documentation
C1 regularization const
Definition at line 249 of file SVM.h.
C2
Definition at line 251 of file SVM.h.
callback function svm optimizers may call when they have a new (small) set of alphas
Definition at line 261 of file SVM.h.
epsilon
Definition at line 243 of file SVM.h.
linear term in qp
Definition at line 238 of file SVM.h.
mkl object that svm optimizers need to pass when calling the callback function
Definition at line 264 of file SVM.h.
nu
Definition at line 247 of file SVM.h.
objective
Definition at line 253 of file SVM.h.
qpsize
Definition at line 255 of file SVM.h.
if SVM is loaded
Definition at line 241 of file SVM.h.
tube epsilon for support vector regression
Definition at line 245 of file SVM.h.
if shrinking shall be used
Definition at line 257 of file SVM.h.
The documentation for this class was generated from the following files: