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) |
Public Attributes | |
| float32_t ** | weight_vectors |
| Weight vectors, one array for each thread. | |
| CLossFunction * | loss |
| Loss function. | |
Protected Attributes | |
| CVwEnvironment * | env |
| Environment. | |
| 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.
| ~CVwRegressor | ( | ) | [virtual] |
Destructor
Definition at line 37 of file VwRegressor.cpp.
| void dump_regressor | ( | char * | reg_name, | |
| bool | as_text | |||
| ) | [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 const char* get_name | ( | ) | const [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.
| void init | ( | CVwEnvironment * | env_to_use = NULL |
) | [virtual] |
Initialize weight vectors
| env_to_use | environment object |
Definition at line 44 of file VwRegressor.cpp.
| void load_regressor | ( | char * | file_name | ) | [virtual] |
Load the regressor from a file
| file_name | name of dumped regressor binary file |
Definition at line 168 of file VwRegressor.cpp.
CVwEnvironment* env [protected] |
Environment.
Definition at line 120 of file VwRegressor.h.
Loss function.
Definition at line 116 of file VwRegressor.h.
Weight vectors, one array for each thread.
Definition at line 114 of file VwRegressor.h.