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 43 of file SVM.h.
CSVM::CSVM | ( | INT | num_sv = 0 |
) |
void CSVM::set_defaults | ( | INT | num_sv = 0 |
) |
bool CSVM::load | ( | FILE * | svm_file | ) | [virtual] |
bool CSVM::save | ( | FILE * | svm_file | ) | [virtual] |
void CSVM::set_weight_epsilon | ( | DREAL | eps | ) |
void CSVM::set_epsilon | ( | DREAL | eps | ) |
void CSVM::set_tube_epsilon | ( | DREAL | eps | ) |
void CSVM::set_C_mkl | ( | DREAL | C | ) |
void CSVM::set_qpsize | ( | INT | qps | ) |
void CSVM::set_bias_enabled | ( | bool | enable_bias | ) |
bool CSVM::get_bias_enabled | ( | ) |
DREAL CSVM::get_weight_epsilon | ( | ) |
int CSVM::get_support_vector | ( | INT | idx | ) |
void CSVM::set_bias | ( | DREAL | bias | ) |
int CSVM::get_num_support_vectors | ( | ) |
bool CSVM::create_new_model | ( | INT | num | ) |
void CSVM::set_shrinking_enabled | ( | bool | enable | ) |
bool CSVM::get_shrinking_enabled | ( | ) |
void CSVM::set_mkl_enabled | ( | bool | enable | ) |
bool CSVM::get_mkl_enabled | ( | ) |
DREAL CSVM::compute_objective | ( | ) |
void CSVM::set_objective | ( | DREAL | v | ) |
bool CSVM::init_kernel_optimization | ( | ) |
classify SVM
lab | classified labels |
Reimplemented from CKernelMachine.
Reimplemented in CMultiClassSVM.
classify one example
num | which example to classify |
Reimplemented from CClassifier.
Reimplemented in CMultiClassSVM.
void * CSVM::classify_example_helper | ( | void * | p | ) | [static] |
void CSVM::set_precomputed_subkernels_enabled | ( | bool | flag | ) |
void CKernelMachine::set_kernel | ( | CKernel * | k | ) | [inherited] |
CKernel* CKernelMachine::get_kernel | ( | ) | [inherited] |
void CKernelMachine::set_batch_computation_enabled | ( | bool | enable | ) | [inherited] |
set batch computation enabled
enable | if batch computation shall be enabled |
Definition at line 72 of file KernelMachine.h.
bool CKernelMachine::get_batch_computation_enabled | ( | ) | [inherited] |
check if batch computation is enabled
Definition at line 81 of file KernelMachine.h.
void CKernelMachine::set_linadd_enabled | ( | bool | enable | ) | [inherited] |
set linadd enabled
enable | if linadd shall be enabled |
Definition at line 90 of file KernelMachine.h.
bool CKernelMachine::get_linadd_enabled | ( | ) | [inherited] |
check if linadd is enabled
Definition at line 99 of file KernelMachine.h.
virtual bool CClassifier::train | ( | ) | [virtual, inherited] |
train classifier
Reimplemented in CKernelPerceptron, CKNN, CPerceptron, CPluginEstimate, CGMNPSVM, CGNPPSVM, CGPBTSVM, CLibSVM, CLibSVMMultiClass, CLibSVMOneClass, CMPDSVM, CSubGradientSVM, CSVMLin, CSVMOcas, CSVMSGD, CWDSVMOcas, CHierarchical, CKMeans, and CLibSVR.
Definition at line 31 of file Classifier.h.
virtual void CClassifier::set_labels | ( | CLabels * | lab | ) | [virtual, inherited] |
virtual CLabels* CClassifier::get_labels | ( | ) | [virtual, inherited] |
get one specific label
i | index of label to get |
Definition at line 89 of file Classifier.h.
void CClassifier::set_max_train_time | ( | DREAL | t | ) | [inherited] |
set maximum training time
t | maximimum training time |
Definition at line 95 of file Classifier.h.
DREAL CClassifier::get_max_train_time | ( | ) | [inherited] |
get maximum training time
Definition at line 101 of file Classifier.h.
virtual EClassifierType CClassifier::get_classifier_type | ( | ) | [virtual, inherited] |
get classifier type
Reimplemented in CKernelPerceptron, CKNN, CPerceptron, CGMNPSVM, CGNPPSVM, CGPBTSVM, CLibSVM, CLibSVMMultiClass, CLibSVMOneClass, CMPDSVM, CSubGradientSVM, CSVMLin, CSVMOcas, CSVMSGD, CWDSVMOcas, CHierarchical, CKMeans, and CLibSVR.
Definition at line 107 of file Classifier.h.
TModel CSVM::svm_model [protected] |
bool CSVM::svm_loaded [protected] |
DREAL CSVM::weight_epsilon [protected] |
DREAL CSVM::epsilon [protected] |
DREAL CSVM::tube_epsilon [protected] |
DREAL CSVM::C_mkl [protected] |
DREAL CSVM::objective [protected] |
int CSVM::qpsize [protected] |
bool CSVM::use_bias [protected] |
bool CSVM::use_shrinking [protected] |
bool CSVM::use_mkl [protected] |
bool CSVM::use_precomputed_subkernels [protected] |
CKernel* CKernelMachine::kernel [protected, inherited] |
kernel
Definition at line 113 of file KernelMachine.h.
bool CKernelMachine::use_batch_computation [protected, inherited] |
if batch computation is enabled
Definition at line 115 of file KernelMachine.h.
bool CKernelMachine::use_linadd [protected, inherited] |
if linadd is enabled
Definition at line 117 of file KernelMachine.h.
DREAL CClassifier::max_train_time [protected, inherited] |
maximum training time
Definition at line 111 of file Classifier.h.
CLabels* CClassifier::labels [protected, inherited] |
labels
Definition at line 114 of file Classifier.h.
CParallel CSGObject::parallel [static, inherited] |
Definition at line 105 of file SGObject.h.
CIO CSGObject::io [static, inherited] |
Definition at line 106 of file SGObject.h.
CVersion CSGObject::version [static, inherited] |
Definition at line 107 of file SGObject.h.