|
SHOGUN
v1.1.0
|
class OnlineSVMSGD
Definition at line 33 of file OnlineSVMSGD.h.

Public Member Functions | |
| COnlineSVMSGD () | |
| COnlineSVMSGD (float64_t C) | |
| COnlineSVMSGD (float64_t C, CStreamingDotFeatures *traindat) | |
| virtual | ~COnlineSVMSGD () |
| virtual EClassifierType | get_classifier_type () |
| virtual bool | train (CFeatures *data=NULL) |
| void | set_C (float64_t c_neg, float64_t c_pos) |
| float64_t | get_C1 () |
| float64_t | get_C2 () |
| void | set_epochs (int32_t e) |
| int32_t | get_epochs () |
| void | set_lambda (float64_t l) |
| float64_t | get_lambda () |
| void | set_bias_enabled (bool enable_bias) |
| bool | get_bias_enabled () |
| void | set_regularized_bias_enabled (bool enable_bias) |
| bool | get_regularized_bias_enabled () |
| void | set_loss_function (CLossFunction *loss_func) |
| CLossFunction * | get_loss_function () |
| virtual const char * | get_name () const |
Public Member Functions inherited from COnlineLinearMachine | |
| COnlineLinearMachine () | |
| virtual | ~COnlineLinearMachine () |
| virtual void | get_w (float32_t *&dst_w, int32_t &dst_dims) |
| virtual void | get_w (float64_t *&dst_w, int32_t &dst_dims) |
| virtual SGVector< float32_t > | get_w () |
| virtual void | set_w (float32_t *src_w, int32_t src_w_dim) |
| virtual void | set_w (float64_t *src_w, int32_t src_w_dim) |
| virtual void | set_bias (float32_t b) |
| virtual float32_t | get_bias () |
| virtual bool | load (FILE *srcfile) |
| virtual bool | save (FILE *dstfile) |
| virtual void | set_features (CStreamingDotFeatures *feat) |
| virtual CLabels * | apply () |
| virtual CLabels * | apply (CFeatures *data) |
| virtual float64_t | apply (int32_t vec_idx) |
| get output for example "vec_idx" | |
| virtual float32_t | apply (float32_t *vec, int32_t len) |
| virtual float32_t | apply_to_current_example () |
| virtual CStreamingDotFeatures * | get_features () |
Public Member Functions inherited from CMachine | |
| CMachine () | |
| virtual | ~CMachine () |
| 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 | |
| void | calibrate (int32_t max_vec_num=1000) |
Additional Inherited Members | |
Public Attributes inherited from CSGObject | |
| SGIO * | io |
| Parallel * | parallel |
| Version * | version |
| Parameter * | m_parameters |
| Parameter * | m_model_selection_parameters |
Protected Attributes inherited from COnlineLinearMachine | |
| int32_t | w_dim |
| float32_t * | w |
| float32_t | bias |
| CStreamingDotFeatures * | features |
| COnlineSVMSGD | ( | ) |
default constructor
Definition at line 30 of file OnlineSVMSGD.cpp.
| COnlineSVMSGD | ( | float64_t | C | ) |
| COnlineSVMSGD | ( | float64_t | C, |
| CStreamingDotFeatures * | traindat | ||
| ) |
constructor
| C | constant C |
| traindat | training features |
Definition at line 45 of file OnlineSVMSGD.cpp.
|
virtual |
Definition at line 55 of file OnlineSVMSGD.cpp.
|
protected |
calibrate
| max_vec_num | Maximum number of vectors to calibrate using (optional) if set to -1, tries to calibrate using all vectors |
Definition at line 167 of file OnlineSVMSGD.cpp.
| bool get_bias_enabled | ( | ) |
| float64_t get_C1 | ( | ) |
| float64_t get_C2 | ( | ) |
|
virtual |
get classifier type
Reimplemented from CMachine.
Definition at line 58 of file OnlineSVMSGD.h.
| int32_t get_epochs | ( | ) |
| float64_t get_lambda | ( | ) |
get lambda
Definition at line 112 of file OnlineSVMSGD.h.
| CLossFunction* get_loss_function | ( | ) |
Return the loss function
Definition at line 148 of file OnlineSVMSGD.h.
|
virtual |
Reimplemented from COnlineLinearMachine.
Definition at line 151 of file OnlineSVMSGD.h.
| bool get_regularized_bias_enabled | ( | ) |
check if regularized bias is enabled
Definition at line 136 of file OnlineSVMSGD.h.
| void set_bias_enabled | ( | bool | enable_bias | ) |
set if bias shall be enabled
| enable_bias | if bias shall be enabled |
Definition at line 118 of file OnlineSVMSGD.h.
set C
| c_neg | new C constant for negatively labeled examples |
| c_pos | new C constant for positively labeled examples |
Definition at line 76 of file OnlineSVMSGD.h.
| void set_epochs | ( | int32_t | e | ) |
| void set_lambda | ( | float64_t | l | ) |
set lambda
| l | value of regularization parameter lambda |
Definition at line 106 of file OnlineSVMSGD.h.
| void set_loss_function | ( | CLossFunction * | loss_func | ) |
Set the loss function to use
| loss_func | object derived from CLossFunction |
Definition at line 60 of file OnlineSVMSGD.cpp.
| void set_regularized_bias_enabled | ( | bool | enable_bias | ) |
set if regularized bias shall be enabled
| enable_bias | if regularized bias shall be enabled |
Definition at line 130 of file OnlineSVMSGD.h.
|
virtual |
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 68 of file OnlineSVMSGD.cpp.