|
SHOGUN
v1.1.0
|
Class implementing a purely online version of LibLinear, using the L2R_L1LOSS_SVC_DUAL solver only.
Definition at line 26 of file OnlineLibLinear.h.

Public Member Functions | |
| COnlineLibLinear () | |
| COnlineLibLinear (float64_t C) | |
| COnlineLibLinear (float64_t C, CStreamingDotFeatures *traindat) | |
| virtual | ~COnlineLibLinear () |
| virtual bool | train (CFeatures *data=NULL) |
| virtual void | set_C (float64_t c_neg, float64_t c_pos) |
| virtual float64_t | get_C1 () |
| float64_t | get_C2 () |
| virtual void | set_bias_enabled (bool enable_bias) |
| virtual bool | get_bias_enabled () |
| 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 () |
| virtual EClassifierType | get_classifier_type () |
| 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) |
Additional Inherited Members | |
Public Attributes inherited from CSGObject | |
| SGIO * | io |
| Parallel * | parallel |
| Version * | version |
| Parameter * | m_parameters |
| Parameter * | m_model_selection_parameters |
Protected Member Functions inherited from CMachine | |
| virtual bool | train_machine (CFeatures *data=NULL) |
| virtual void | store_model_features () |
Protected Attributes inherited from COnlineLinearMachine | |
| int32_t | w_dim |
| float32_t * | w |
| float32_t | bias |
| CStreamingDotFeatures * | features |
| COnlineLibLinear | ( | ) |
Default constructor
Definition at line 18 of file OnlineLibLinear.cpp.
| COnlineLibLinear | ( | float64_t | C, |
| CStreamingDotFeatures * | traindat | ||
| ) |
Constructor
| C | Cost constant C |
| traindat | Training examples |
Definition at line 32 of file OnlineLibLinear.cpp.
|
virtual |
Destructor
Definition at line 55 of file OnlineLibLinear.cpp.
|
virtual |
|
virtual |
| float64_t get_C2 | ( | ) |
|
virtual |
Reimplemented from COnlineLinearMachine.
Definition at line 97 of file OnlineLibLinear.h.
|
virtual |
Set whether to use bias or not
| enable_bias | true if bias should be used |
Definition at line 87 of file OnlineLibLinear.h.
Set C1 and C2 constants
| c_neg | C1 value |
| c_pos | C2 value |
Definition at line 66 of file OnlineLibLinear.h.
|
virtual |
Train classifier
| data | Training data, can be avoided if already initialized with it |
Reimplemented from CMachine.
Definition at line 59 of file OnlineLibLinear.cpp.