|
SHOGUN
v1.1.0
|
class WDSVMOcas
Definition at line 26 of file WDSVMOcas.h.

Public Member Functions | |
| CWDSVMOcas () | |
| CWDSVMOcas (E_SVM_TYPE type) | |
| CWDSVMOcas (float64_t C, int32_t d, int32_t from_d, CStringFeatures< uint8_t > *traindat, CLabels *trainlab) | |
| virtual | ~CWDSVMOcas () |
| virtual EClassifierType | get_classifier_type () |
| void | set_C (float64_t c_neg, float64_t c_pos) |
| float64_t | get_C1 () |
| float64_t | get_C2 () |
| void | set_epsilon (float64_t eps) |
| float64_t | get_epsilon () |
| void | set_features (CStringFeatures< uint8_t > *feat) |
| CStringFeatures< uint8_t > * | get_features () |
| void | set_bias_enabled (bool enable_bias) |
| bool | get_bias_enabled () |
| void | set_bufsize (int32_t sz) |
| int32_t | get_bufsize () |
| void | set_degree (int32_t d, int32_t from_d) |
| int32_t | get_degree () |
| CLabels * | apply () |
| virtual CLabels * | apply (CFeatures *data) |
| virtual float64_t | apply (int32_t num) |
| void | set_normalization_const () |
| float64_t | get_normalization_const () |
Public Member Functions inherited from CMachine | |
| CMachine () | |
| virtual | ~CMachine () |
| virtual bool | train (CFeatures *data=NULL) |
| virtual bool | load (FILE *srcfile) |
| virtual bool | save (FILE *dstfile) |
| virtual void | set_labels (CLabels *lab) |
| virtual CLabels * | get_labels () |
| virtual float64_t | get_label (int32_t i) |
| void | set_max_train_time (float64_t t) |
| float64_t | get_max_train_time () |
| void | set_solver_type (ESolverType st) |
| ESolverType | get_solver_type () |
| virtual void | set_store_model_features (bool store_model) |
Public Member Functions inherited from CSGObject | |
| CSGObject () | |
| CSGObject (const CSGObject &orig) | |
| virtual | ~CSGObject () |
| virtual bool | is_generic (EPrimitiveType *generic) const |
| template<class T > | |
| void | set_generic () |
| void | unset_generic () |
| virtual void | print_serializable (const char *prefix="") |
| virtual bool | save_serializable (CSerializableFile *file, const char *prefix="") |
| virtual bool | load_serializable (CSerializableFile *file, const char *prefix="") |
| void | set_global_io (SGIO *io) |
| SGIO * | get_global_io () |
| void | set_global_parallel (Parallel *parallel) |
| Parallel * | get_global_parallel () |
| void | set_global_version (Version *version) |
| Version * | get_global_version () |
| SGVector< char * > | get_modelsel_names () |
| char * | get_modsel_param_descr (const char *param_name) |
| index_t | get_modsel_param_index (const char *param_name) |
Protected Member Functions | |
| int32_t | set_wd_weights () |
| virtual const char * | get_name () const |
| virtual bool | train_machine (CFeatures *data=NULL) |
Protected Member Functions inherited from CMachine | |
| virtual void | store_model_features () |
Protected Member Functions inherited from CSGObject | |
| virtual void | load_serializable_pre () throw (ShogunException) |
| virtual void | load_serializable_post () throw (ShogunException) |
| virtual void | save_serializable_pre () throw (ShogunException) |
| virtual void | save_serializable_post () throw (ShogunException) |
Static Protected Member Functions | |
| static void | compute_W (float64_t *sq_norm_W, float64_t *dp_WoldW, float64_t *alpha, uint32_t nSel, void *ptr) |
| static float64_t | update_W (float64_t t, void *ptr) |
| static void * | add_new_cut_helper (void *ptr) |
| static int | add_new_cut (float64_t *new_col_H, uint32_t *new_cut, uint32_t cut_length, uint32_t nSel, void *ptr) |
| static void * | compute_output_helper (void *ptr) |
| static int | compute_output (float64_t *output, void *ptr) |
| static int | sort (float64_t *vals, float64_t *data, uint32_t size) |
| static void | print (ocas_return_value_T value) |
Protected Attributes | |
| CStringFeatures< uint8_t > * | features |
| bool | use_bias |
| int32_t | bufsize |
| float64_t | C1 |
| float64_t | C2 |
| float64_t | epsilon |
| E_SVM_TYPE | method |
| int32_t | degree |
| int32_t | from_degree |
| float32_t * | wd_weights |
| int32_t | num_vec |
| int32_t | string_length |
| int32_t | alphabet_size |
| float64_t | normalization_const |
| float64_t | bias |
| float64_t | old_bias |
| int32_t * | w_offsets |
| int32_t | w_dim |
| int32_t | w_dim_single_char |
| float32_t * | w |
| float32_t * | old_w |
| float64_t * | lab |
| float32_t ** | cuts |
| float64_t * | cp_bias |
Protected Attributes inherited from CMachine | |
| float64_t | max_train_time |
| CLabels * | labels |
| ESolverType | solver_type |
| bool | m_store_model_features |
Additional Inherited Members | |
Public Attributes inherited from CSGObject | |
| SGIO * | io |
| Parallel * | parallel |
| Version * | version |
| Parameter * | m_parameters |
| Parameter * | m_model_selection_parameters |
| CWDSVMOcas | ( | ) |
default constructor
Definition at line 48 of file WDSVMOcas.cpp.
| CWDSVMOcas | ( | E_SVM_TYPE | type | ) |
| CWDSVMOcas | ( | float64_t | C, |
| int32_t | d, | ||
| int32_t | from_d, | ||
| CStringFeatures< uint8_t > * | traindat, | ||
| CLabels * | trainlab | ||
| ) |
constructor
| C | constant C |
| d | degree |
| from_d | from degree |
| traindat | training features |
| trainlab | labels for training features |
Definition at line 78 of file WDSVMOcas.cpp.
|
virtual |
Definition at line 95 of file WDSVMOcas.cpp.
|
staticprotected |
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 346 of file WDSVMOcas.cpp.
|
staticprotected |
helper function for adding a new cut
| ptr |
Definition at line 294 of file WDSVMOcas.cpp.
|
virtual |
classify all examples
Implements CMachine.
Definition at line 99 of file WDSVMOcas.cpp.
classify objects
| data | (test)data to be classified |
Implements CMachine.
Definition at line 121 of file WDSVMOcas.cpp.
|
virtual |
classify one example
| num | number of example to classify |
Reimplemented from CMachine.
Definition at line 169 of file WDSVMOcas.h.
|
staticprotected |
|
staticprotected |
helper function for computing the output
| ptr |
Definition at line 443 of file WDSVMOcas.cpp.
|
staticprotected |
compute W
| sq_norm_W | square normed W |
| dp_WoldW | dp W old W |
| alpha | alpha |
| nSel | nSel |
| ptr | ptr |
Definition at line 603 of file WDSVMOcas.cpp.
| bool get_bias_enabled | ( | ) |
| int32_t get_bufsize | ( | ) |
| float64_t get_C1 | ( | ) |
| float64_t get_C2 | ( | ) |
|
virtual |
get classifier type
Reimplemented from CMachine.
Definition at line 55 of file WDSVMOcas.h.
| int32_t get_degree | ( | ) |
| float64_t get_epsilon | ( | ) |
| CStringFeatures<uint8_t>* get_features | ( | ) |
|
protectedvirtual |
| float64_t get_normalization_const | ( | ) |
|
staticprotected |
print nothing
Definition at line 285 of file WDSVMOcas.h.
| void set_bias_enabled | ( | bool | enable_bias | ) |
set if bias shall be enabled
| enable_bias | if bias shall be enabled |
Definition at line 114 of file WDSVMOcas.h.
| void set_bufsize | ( | int32_t | sz | ) |
set C
| c_neg | new C constant for negatively labeled examples |
| c_pos | new C constant for positively labeled examples |
Definition at line 63 of file WDSVMOcas.h.
| void set_degree | ( | int32_t | d, |
| int32_t | from_d | ||
| ) |
| void set_epsilon | ( | float64_t | eps | ) |
| void set_features | ( | CStringFeatures< uint8_t > * | feat | ) |
| void set_normalization_const | ( | ) |
set normalization const
Definition at line 198 of file WDSVMOcas.h.
|
protected |
|
protectedvirtual |
train classifier
| data | training data (parameter can be avoided if distance or kernel-based classifiers are used and distance/kernels are initialized with train data) |
Reimplemented from CMachine.
Definition at line 154 of file WDSVMOcas.cpp.
|
protected |
size of alphabet
Definition at line 332 of file WDSVMOcas.h.
|
protected |
bias
Definition at line 338 of file WDSVMOcas.h.
|
protected |
buffer size
Definition at line 311 of file WDSVMOcas.h.
|
protected |
C1
Definition at line 313 of file WDSVMOcas.h.
|
protected |
C2
Definition at line 315 of file WDSVMOcas.h.
|
protected |
bias dimensions
Definition at line 357 of file WDSVMOcas.h.
|
protected |
cuts
Definition at line 355 of file WDSVMOcas.h.
|
protected |
degree
Definition at line 322 of file WDSVMOcas.h.
|
protected |
epsilon
Definition at line 317 of file WDSVMOcas.h.
|
protected |
features
Definition at line 307 of file WDSVMOcas.h.
|
protected |
from degree
Definition at line 324 of file WDSVMOcas.h.
|
protected |
labels
Definition at line 352 of file WDSVMOcas.h.
|
protected |
method
Definition at line 319 of file WDSVMOcas.h.
|
protected |
normalization const
Definition at line 335 of file WDSVMOcas.h.
|
protected |
num vectors
Definition at line 328 of file WDSVMOcas.h.
|
protected |
old_bias
Definition at line 340 of file WDSVMOcas.h.
|
protected |
old w
Definition at line 350 of file WDSVMOcas.h.
|
protected |
length of string in vector
Definition at line 330 of file WDSVMOcas.h.
|
protected |
if bias shall be used
Definition at line 309 of file WDSVMOcas.h.
|
protected |
w
Definition at line 348 of file WDSVMOcas.h.
|
protected |
w dim
Definition at line 344 of file WDSVMOcas.h.
|
protected |
w dim of a single char
Definition at line 346 of file WDSVMOcas.h.
|
protected |
w offsets
Definition at line 342 of file WDSVMOcas.h.
|
protected |
wd weights
Definition at line 326 of file WDSVMOcas.h.