CLibSVM Class Reference
List of all members.
Detailed Description
LibSVM
Definition at line 21 of file LibSVM.h.
Constructor & Destructor Documentation
constructor
- Parameters:
-
| C | constant C |
| k | kernel |
| lab | labels |
Definition at line 19 of file LibSVM.cpp.
CLibSVM::~CLibSVM |
( |
|
) |
[virtual] |
Member Function Documentation
bool CLibSVM::train |
( |
|
) |
[virtual] |
get classifier type
- Returns:
- classifier type LIBSVM
Reimplemented from CClassifier.
Definition at line 43 of file LibSVM.h.
void CSVM::set_defaults |
( |
INT |
num_sv = 0 |
) |
[inherited] |
set default values for members a SVM object
Definition at line 56 of file SVM.cpp.
bool CSVM::load |
( |
FILE * |
svm_file |
) |
[virtual, inherited] |
load a SVM from file
- Parameters:
-
Reimplemented from CClassifier.
Definition at line 87 of file SVM.cpp.
bool CSVM::save |
( |
FILE * |
svm_file |
) |
[virtual, inherited] |
write a SVM to a file
- Parameters:
-
Reimplemented from CClassifier.
Definition at line 200 of file SVM.cpp.
void CSVM::set_nu |
( |
DREAL |
nue |
) |
[inherited] |
set nu
- Parameters:
-
Definition at line 79 of file SVM.h.
void CSVM::set_C |
( |
DREAL |
c1, |
|
|
DREAL |
c2 | |
|
) |
| | [inherited] |
set C
- Parameters:
-
Definition at line 86 of file SVM.h.
void CSVM::set_weight_epsilon |
( |
DREAL |
eps |
) |
[inherited] |
set epsilon for weights
- Parameters:
-
Definition at line 92 of file SVM.h.
void CSVM::set_epsilon |
( |
DREAL |
eps |
) |
[inherited] |
set epsilon
- Parameters:
-
Definition at line 98 of file SVM.h.
void CSVM::set_tube_epsilon |
( |
DREAL |
eps |
) |
[inherited] |
set tube epsilon
- Parameters:
-
Definition at line 104 of file SVM.h.
void CSVM::set_C_mkl |
( |
DREAL |
C |
) |
[inherited] |
set C mkl
- Parameters:
-
Definition at line 110 of file SVM.h.
void CSVM::set_qpsize |
( |
INT |
qps |
) |
[inherited] |
set qpsize
- Parameters:
-
Definition at line 116 of file SVM.h.
void CSVM::set_bias_enabled |
( |
bool |
enable_bias |
) |
[inherited] |
set state of bias
- Parameters:
-
| enable_bias | if bias shall be enabled |
Definition at line 122 of file SVM.h.
bool CSVM::get_bias_enabled |
( |
|
) |
[inherited] |
get state of bias
- Returns:
- state of bias
Definition at line 128 of file SVM.h.
DREAL CSVM::get_weight_epsilon |
( |
|
) |
[inherited] |
get epsilon for weights
- Returns:
- epsilon for weights
Definition at line 134 of file SVM.h.
DREAL CSVM::get_epsilon |
( |
|
) |
[inherited] |
get epsilon
- Returns:
- epsilon
Definition at line 140 of file SVM.h.
DREAL CSVM::get_nu |
( |
|
) |
[inherited] |
get nu
- Returns:
- nu
Definition at line 146 of file SVM.h.
DREAL CSVM::get_C1 |
( |
|
) |
[inherited] |
get C1
- Returns:
- C1
Definition at line 152 of file SVM.h.
DREAL CSVM::get_C2 |
( |
|
) |
[inherited] |
get C2
- Returns:
- C2
Definition at line 158 of file SVM.h.
int CSVM::get_qpsize |
( |
|
) |
[inherited] |
get qpsize
- Returns:
- qpsize
Definition at line 164 of file SVM.h.
int CSVM::get_support_vector |
( |
INT |
idx |
) |
[inherited] |
get support vector at given index
- Parameters:
-
| idx | index of support vector |
- Returns:
- support vector
Definition at line 171 of file SVM.h.
DREAL CSVM::get_alpha |
( |
INT |
idx |
) |
[inherited] |
get alpha at given index
- Parameters:
-
- Returns:
- alpha
Definition at line 182 of file SVM.h.
bool CSVM::set_support_vector |
( |
INT |
idx, |
|
|
INT |
val | |
|
) |
| | [inherited] |
set support vector at given index to given value
- Parameters:
-
| idx | index of support vector |
| val | new value of support vector |
- Returns:
- if operation was successful
Definition at line 194 of file SVM.h.
bool CSVM::set_alpha |
( |
INT |
idx, |
|
|
DREAL |
val | |
|
) |
| | [inherited] |
set alpha at given index to given value
- Parameters:
-
| idx | index of alpha vector |
| val | new value of alpha vector |
- Returns:
- if operation was successful
Definition at line 210 of file SVM.h.
DREAL CSVM::get_bias |
( |
|
) |
[inherited] |
get bias
- Returns:
- bias
Definition at line 224 of file SVM.h.
void CSVM::set_bias |
( |
DREAL |
bias |
) |
[inherited] |
set bias to given value
- Parameters:
-
Definition at line 233 of file SVM.h.
int CSVM::get_num_support_vectors |
( |
|
) |
[inherited] |
get number of support vectors
- Returns:
- number of support vectors
Definition at line 242 of file SVM.h.
void CSVM::set_alphas |
( |
DREAL * |
alphas, |
|
|
INT |
d | |
|
) |
| | [inherited] |
set alphas to given values
- Parameters:
-
| alphas | array with all alphas to set |
| d | number of alphas (== number of support vectors) |
Definition at line 252 of file SVM.h.
void CSVM::set_support_vectors |
( |
INT * |
svs, |
|
|
INT |
d | |
|
) |
| | [inherited] |
set support vectors to given values
- Parameters:
-
| svs | array with all support vectors to set |
| d | number of support vectors |
Definition at line 266 of file SVM.h.
void CSVM::get_support_vectors |
( |
INT ** |
svs, |
|
|
INT * |
num | |
|
) |
| | [inherited] |
get all support vectors (swig compatible)
- Parameters:
-
| svs | array to contain a copy of the support vectors |
| num | number of support vectors in the array |
Definition at line 280 of file SVM.h.
void CSVM::get_alphas |
( |
DREAL ** |
alphas, |
|
|
INT * |
d1 | |
|
) |
| | [inherited] |
get all alphas (swig compatible)
- Parameters:
-
| alphas | array to contain a copy of the alphas |
| d1 | number of alphas in the array |
Definition at line 301 of file SVM.h.
bool CSVM::create_new_model |
( |
INT |
num |
) |
[inherited] |
create new model
- Parameters:
-
| num | number of alphas and support vectors in new model |
Definition at line 321 of file SVM.h.
void CSVM::set_shrinking_enabled |
( |
bool |
enable |
) |
[inherited] |
set state of shrinking
- Parameters:
-
| enable | if shrinking will be enabled |
Definition at line 347 of file SVM.h.
bool CSVM::get_shrinking_enabled |
( |
|
) |
[inherited] |
get state of shrinking
- Returns:
- if shrinking is enabled
Definition at line 356 of file SVM.h.
void CSVM::set_mkl_enabled |
( |
bool |
enable |
) |
[inherited] |
set state of mkl
- Parameters:
-
| enable | if mkl shall be enabled |
Definition at line 365 of file SVM.h.
bool CSVM::get_mkl_enabled |
( |
|
) |
[inherited] |
get state of mkl
- Returns:
- if mkl is enabled
Definition at line 374 of file SVM.h.
DREAL CSVM::compute_objective |
( |
|
) |
[inherited] |
compute objective
- Returns:
- computed objective
Definition at line 412 of file SVM.cpp.
void CSVM::set_objective |
( |
DREAL |
v |
) |
[inherited] |
set objective
- Parameters:
-
Definition at line 389 of file SVM.h.
DREAL CSVM::get_objective |
( |
|
) |
[inherited] |
get objective
- Returns:
- objective
Definition at line 398 of file SVM.h.
bool CSVM::init_kernel_optimization |
( |
|
) |
[inherited] |
initialise kernel optimisation
- Returns:
- if operation was successful
Definition at line 220 of file SVM.cpp.
CLabels * CSVM::classify |
( |
CLabels * |
lab = NULL |
) |
[virtual, inherited] |
DREAL CSVM::classify_example |
( |
INT |
num |
) |
[virtual, inherited] |
classify one example
- Parameters:
-
| num | which example to classify |
- Returns:
- classified value
Reimplemented from CClassifier.
Reimplemented in CMultiClassSVM.
Definition at line 392 of file SVM.cpp.
void * CSVM::classify_example_helper |
( |
void * |
p |
) |
[static, inherited] |
classify example helper, used in threads
- Parameters:
-
- Returns:
- nothing really
Definition at line 251 of file SVM.cpp.
void CSVM::set_precomputed_subkernels_enabled |
( |
bool |
flag |
) |
[inherited] |
set state of precomputed subkernels
- Parameters:
-
| flag | if precomputed subkernels shall be enabled |
Definition at line 434 of file SVM.h.
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
- Parameters:
-
| 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
- Returns:
- if batch computation is enabled
Definition at line 81 of file KernelMachine.h.
void CKernelMachine::set_linadd_enabled |
( |
bool |
enable |
) |
[inherited] |
set linadd enabled
- Parameters:
-
| 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
- Returns:
- if linadd is enabled
Definition at line 99 of file KernelMachine.h.
virtual void CClassifier::set_labels |
( |
CLabels * |
lab |
) |
[virtual, inherited] |
virtual CLabels* CClassifier::get_labels |
( |
|
) |
[virtual, inherited] |
virtual DREAL CClassifier::get_label |
( |
INT |
i |
) |
[virtual, inherited] |
get one specific label
- Parameters:
-
- Returns:
- value of label at index i
Definition at line 89 of file Classifier.h.
void CClassifier::set_max_train_time |
( |
DREAL |
t |
) |
[inherited] |
set maximum training time
- Parameters:
-
| t | maximimum training time |
Definition at line 95 of file Classifier.h.
DREAL CClassifier::get_max_train_time |
( |
|
) |
[inherited] |
get maximum training time
- Returns:
- maximum training time
Definition at line 101 of file Classifier.h.
Member Data Documentation
SVM problem
Definition at line 47 of file LibSVM.h.
SVM's model
Definition at line 455 of file SVM.h.
if SVM is loaded
Definition at line 457 of file SVM.h.
epsilon of weights
Definition at line 459 of file SVM.h.
epsilon
Definition at line 461 of file SVM.h.
tube epsilon
Definition at line 463 of file SVM.h.
nu
Definition at line 465 of file SVM.h.
C1
Definition at line 467 of file SVM.h.
C2
Definition at line 469 of file SVM.h.
C_mkl
Definition at line 471 of file SVM.h.
objective
Definition at line 473 of file SVM.h.
qpsize
Definition at line 475 of file SVM.h.
if bias shall be used
Definition at line 477 of file SVM.h.
if shrinking shall be used
Definition at line 479 of file SVM.h.
if mkl shall be used
Definition at line 481 of file SVM.h.
if precomputed subkernels shall be used
Definition at line 483 of file SVM.h.
The documentation for this class was generated from the following files: