
Definition at line 22 of file WDSVMOcas.h.
Public Member Functions | |
| CWDSVMOcas (E_SVM_TYPE type) | |
| CWDSVMOcas (DREAL C, INT d, INT from_d, CStringFeatures< BYTE > *traindat, CLabels *trainlab) | |
| virtual | ~CWDSVMOcas () |
| virtual EClassifierType | get_classifier_type () |
| virtual bool | train () |
| void | set_C (DREAL c1, DREAL c2) |
| DREAL | get_C1 () |
| DREAL | get_C2 () |
| void | set_epsilon (DREAL eps) |
| DREAL | get_epsilon () |
| void | set_features (CStringFeatures< BYTE > *feat) |
| CStringFeatures< BYTE > * | get_features () |
| void | set_bias_enabled (bool enable_bias) |
| bool | get_bias_enabled () |
| void | set_bufsize (INT sz) |
| INT | get_bufsize () |
| void | set_degree (INT d, INT from_d) |
| INT | get_degree () |
| CLabels * | classify (CLabels *output) |
| virtual DREAL | classify_example (INT num) |
| void | set_normalization_const () |
| DREAL | get_normalization_const () |
| virtual bool | load (FILE *srcfile) |
| virtual bool | save (FILE *dstfile) |
| virtual void | set_labels (CLabels *lab) |
| virtual CLabels * | get_labels () |
| virtual DREAL | get_label (INT i) |
| void | set_max_train_time (DREAL t) |
| DREAL | get_max_train_time () |
Static Public Attributes | |
| static CParallel | parallel |
| static CIO | io |
| static CVersion | version |
Protected Member Functions | |
| INT | set_wd_weights () |
Static Protected Member Functions | |
| static void | compute_W (double *sq_norm_W, double *dp_WoldW, double *alpha, uint32_t nSel, void *ptr) |
| static double | update_W (double t, void *ptr) |
| static void * | add_new_cut_helper (void *ptr) |
| static void | add_new_cut (double *new_col_H, uint32_t *new_cut, uint32_t cut_length, uint32_t nSel, void *ptr) |
| static void * | compute_output_helper (void *ptr) |
| static void | compute_output (double *output, void *ptr) |
| static void | sort (double *vals, uint32_t *idx, uint32_t size) |
Protected Attributes | |
| CStringFeatures< BYTE > * | features |
| bool | use_bias |
| INT | bufsize |
| DREAL | C1 |
| DREAL | C2 |
| DREAL | epsilon |
| E_SVM_TYPE | method |
| INT | degree |
| INT | from_degree |
| SHORTREAL * | wd_weights |
| INT | num_vec |
| INT | string_length |
| INT | alphabet_size |
| DREAL | normalization_const |
| DREAL | bias |
| INT * | w_offsets |
| INT | w_dim |
| INT | w_dim_single_char |
| SHORTREAL * | w |
| SHORTREAL * | old_w |
| DREAL * | tmp_a_buf |
| DREAL * | lab |
| SHORTREAL ** | cuts |
| DREAL | max_train_time |
| CLabels * | labels |
| CWDSVMOcas::CWDSVMOcas | ( | E_SVM_TYPE | type | ) |
| CWDSVMOcas::CWDSVMOcas | ( | DREAL | C, | |
| INT | d, | |||
| INT | from_d, | |||
| CStringFeatures< BYTE > * | traindat, | |||
| CLabels * | trainlab | |||
| ) |
constructor
| C | constant C | |
| d | degree | |
| from_d | from degree | |
| traindat | training features | |
| trainlab | labels for training features |
Definition at line 58 of file WDSVMOcas.cpp.
| CWDSVMOcas::~CWDSVMOcas | ( | ) | [virtual] |
Definition at line 73 of file WDSVMOcas.cpp.
| virtual EClassifierType CWDSVMOcas::get_classifier_type | ( | ) | [virtual] |
get classifier type
Reimplemented from CClassifier.
Definition at line 46 of file WDSVMOcas.h.
| bool CWDSVMOcas::train | ( | ) | [virtual] |
train SVM
Reimplemented from CClassifier.
Definition at line 117 of file WDSVMOcas.cpp.
| DREAL CWDSVMOcas::get_C1 | ( | ) |
| DREAL CWDSVMOcas::get_C2 | ( | ) |
| void CWDSVMOcas::set_epsilon | ( | DREAL | eps | ) |
| DREAL CWDSVMOcas::get_epsilon | ( | ) |
| void CWDSVMOcas::set_features | ( | CStringFeatures< BYTE > * | feat | ) |
| CStringFeatures<BYTE>* CWDSVMOcas::get_features | ( | ) |
| void CWDSVMOcas::set_bias_enabled | ( | bool | enable_bias | ) |
set if bias shall be enabled
| enable_bias | if bias shall be enabled |
Definition at line 101 of file WDSVMOcas.h.
| bool CWDSVMOcas::get_bias_enabled | ( | ) |
| void CWDSVMOcas::set_bufsize | ( | INT | sz | ) |
| INT CWDSVMOcas::get_bufsize | ( | ) |
| INT CWDSVMOcas::get_degree | ( | ) |
classify all examples
| output | resulting labels |
Reimplemented from CClassifier.
Definition at line 77 of file WDSVMOcas.cpp.
classify one example
| num | number of example to classify |
Reimplemented from CClassifier.
Definition at line 146 of file WDSVMOcas.h.
| void CWDSVMOcas::set_normalization_const | ( | ) |
set normalization const
Definition at line 172 of file WDSVMOcas.h.
| DREAL CWDSVMOcas::get_normalization_const | ( | ) |
| INT CWDSVMOcas::set_wd_weights | ( | ) | [protected] |
| void CWDSVMOcas::compute_W | ( | double * | sq_norm_W, | |
| double * | dp_WoldW, | |||
| double * | alpha, | |||
| uint32_t | nSel, | |||
| void * | ptr | |||
| ) | [static, protected] |
compute W
| sq_norm_W | square normed W | |
| dp_WoldW | dp W old W | |
| alpha | alpha | |
| nSel | nSel | |
| ptr | ptr |
Definition at line 535 of file WDSVMOcas.cpp.
| double CWDSVMOcas::update_W | ( | double | t, | |
| void * | ptr | |||
| ) | [static, protected] |
update W
| t | t | |
| ptr | ptr |
Definition at line 210 of file WDSVMOcas.cpp.
| void * CWDSVMOcas::add_new_cut_helper | ( | void * | ptr | ) | [static, protected] |
helper function for adding a new cut
| ptr |
Definition at line 235 of file WDSVMOcas.cpp.
| void CWDSVMOcas::add_new_cut | ( | double * | new_col_H, | |
| uint32_t * | new_cut, | |||
| uint32_t | cut_length, | |||
| uint32_t | nSel, | |||
| void * | ptr | |||
| ) | [static, protected] |
add new cut
| new_col_H | new col H | |
| new_cut | new cut | |
| cut_length | length of cut | |
| nSel | nSel | |
| ptr | ptr |
Definition at line 285 of file WDSVMOcas.cpp.
| void * CWDSVMOcas::compute_output_helper | ( | void * | ptr | ) | [static, protected] |
helper function for computing the output
| ptr |
Definition at line 376 of file WDSVMOcas.cpp.
| void CWDSVMOcas::compute_output | ( | double * | output, | |
| void * | ptr | |||
| ) | [static, protected] |
| void CWDSVMOcas::sort | ( | double * | vals, | |
| uint32_t * | idx, | |||
| uint32_t | size | |||
| ) | [static, protected] |
| virtual bool CClassifier::load | ( | FILE * | srcfile | ) | [virtual, inherited] |
load Classifier from file
abstract base method
| srcfile | file to load from |
Reimplemented in CKernelPerceptron, CKNN, CLinearClassifier, CSVM, CHierarchical, and CKMeans.
Definition at line 56 of file Classifier.h.
| virtual bool CClassifier::save | ( | FILE * | dstfile | ) | [virtual, inherited] |
save Classifier to file
abstract base method
| dstfile | file to save to |
Reimplemented in CKernelPerceptron, CKNN, CLinearClassifier, CSVM, CHierarchical, and CKMeans.
Definition at line 65 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.
CStringFeatures<BYTE>* CWDSVMOcas::features [protected] |
features
Definition at line 257 of file WDSVMOcas.h.
bool CWDSVMOcas::use_bias [protected] |
if bias shall be used
Definition at line 259 of file WDSVMOcas.h.
INT CWDSVMOcas::bufsize [protected] |
buffer size
Definition at line 261 of file WDSVMOcas.h.
DREAL CWDSVMOcas::C1 [protected] |
C1
Definition at line 263 of file WDSVMOcas.h.
DREAL CWDSVMOcas::C2 [protected] |
C2
Definition at line 265 of file WDSVMOcas.h.
DREAL CWDSVMOcas::epsilon [protected] |
epsilon
Definition at line 267 of file WDSVMOcas.h.
E_SVM_TYPE CWDSVMOcas::method [protected] |
method
Definition at line 269 of file WDSVMOcas.h.
INT CWDSVMOcas::degree [protected] |
degree
Definition at line 272 of file WDSVMOcas.h.
INT CWDSVMOcas::from_degree [protected] |
from degree
Definition at line 274 of file WDSVMOcas.h.
SHORTREAL* CWDSVMOcas::wd_weights [protected] |
wd weights
Definition at line 276 of file WDSVMOcas.h.
INT CWDSVMOcas::num_vec [protected] |
num vectors
Definition at line 278 of file WDSVMOcas.h.
INT CWDSVMOcas::string_length [protected] |
length of string in vector
Definition at line 280 of file WDSVMOcas.h.
INT CWDSVMOcas::alphabet_size [protected] |
size of alphabet
Definition at line 282 of file WDSVMOcas.h.
DREAL CWDSVMOcas::normalization_const [protected] |
normalization const
Definition at line 285 of file WDSVMOcas.h.
DREAL CWDSVMOcas::bias [protected] |
bias
Definition at line 288 of file WDSVMOcas.h.
INT* CWDSVMOcas::w_offsets [protected] |
w offsets
Definition at line 290 of file WDSVMOcas.h.
INT CWDSVMOcas::w_dim [protected] |
w dim
Definition at line 292 of file WDSVMOcas.h.
INT CWDSVMOcas::w_dim_single_char [protected] |
w dim of a single char
Definition at line 294 of file WDSVMOcas.h.
SHORTREAL* CWDSVMOcas::w [protected] |
w
Definition at line 296 of file WDSVMOcas.h.
SHORTREAL* CWDSVMOcas::old_w [protected] |
old w
Definition at line 298 of file WDSVMOcas.h.
DREAL* CWDSVMOcas::tmp_a_buf [protected] |
nDim big
Definition at line 300 of file WDSVMOcas.h.
DREAL* CWDSVMOcas::lab [protected] |
labels
Definition at line 302 of file WDSVMOcas.h.
SHORTREAL** CWDSVMOcas::cuts [protected] |
cuts
Definition at line 305 of file WDSVMOcas.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.