SHOGUN
v1.1.0
|
Regressor used by VW.
Stores the weight vectors and loss object, and is used for calculating losses and updates.
The weight vector uses 'num_bits' number of bits, set in the environment object to store weights.
Definition at line 35 of file VwRegressor.h.
Public Member Functions | |
CVwRegressor () | |
CVwRegressor (CVwEnvironment *env_to_use) | |
virtual | ~CVwRegressor () |
float64_t | get_loss (float64_t prediction, float64_t label) |
float64_t | get_update (float64_t prediction, float64_t label, float64_t eta_t, float64_t norm) |
virtual void | dump_regressor (char *reg_name, bool as_text) |
virtual void | load_regressor (char *file_name) |
virtual const char * | get_name () const |
virtual void | init (CVwEnvironment *env_to_use=NULL) |
![]() | |
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) |
Public Attributes | |
float32_t ** | weight_vectors |
Weight vectors, one array for each thread. | |
CLossFunction * | loss |
Loss function. | |
![]() | |
SGIO * | io |
Parallel * | parallel |
Version * | version |
Parameter * | m_parameters |
Parameter * | m_model_selection_parameters |
Protected Attributes | |
CVwEnvironment * | env |
Environment. |
Additional Inherited Members | |
![]() | |
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) |
CVwRegressor | ( | ) |
Default constructor
Definition at line 21 of file VwRegressor.cpp.
CVwRegressor | ( | CVwEnvironment * | env_to_use | ) |
Constructor taking an environment object
env_to_use | environment |
Definition at line 29 of file VwRegressor.cpp.
|
virtual |
Destructor
Definition at line 37 of file VwRegressor.cpp.
|
virtual |
Dump regressor in binary/text form
reg_name | output file name |
as_text | whether to dump as text |
Definition at line 81 of file VwRegressor.cpp.
Get loss for a label-prediction set
prediction | prediction |
label | label |
Definition at line 63 of file VwRegressor.h.
|
virtual |
Return name of the object
Implements CSGObject.
Definition at line 103 of file VwRegressor.h.
Get weight update for a prediction-label set
prediction | prediction |
label | label |
eta_t | learning rate |
norm | scaling norm |
Definition at line 78 of file VwRegressor.h.
|
virtual |
Initialize weight vectors
env_to_use | environment object |
Definition at line 44 of file VwRegressor.cpp.
|
virtual |
Load the regressor from a file
file_name | name of dumped regressor binary file |
Definition at line 168 of file VwRegressor.cpp.
|
protected |
Environment.
Definition at line 120 of file VwRegressor.h.
CLossFunction* loss |
Loss function.
Definition at line 116 of file VwRegressor.h.
float32_t** weight_vectors |
Weight vectors, one array for each thread.
Definition at line 114 of file VwRegressor.h.