Public Member Functions | Public Attributes | Protected Attributes

CVwRegressor Class Reference

Detailed Description

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.

Inheritance diagram for CVwRegressor:
Inheritance graph

List of all members.

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.
 Loss function.

Protected Attributes


Constructor & Destructor Documentation

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]


Definition at line 37 of file VwRegressor.cpp.

Member Function Documentation

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.

float64_t get_loss ( float64_t  prediction,
float64_t  label 

Get loss for a label-prediction set

prediction prediction
label label

Definition at line 63 of file VwRegressor.h.

virtual const char* get_name ( void   )  const [virtual]

Return name of the object


Implements CSGObject.

Definition at line 103 of file VwRegressor.h.

float64_t get_update ( float64_t  prediction,
float64_t  label,
float64_t  eta_t,
float64_t  norm 

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.

Member Data Documentation

CVwEnvironment* env [protected]


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.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation