Public Member Functions | Protected Attributes

CVwLearner Class Reference


Detailed Description

Base class for all VW learners.

Learners are supplied with a regressor and the environment.

They should implement a train function which updates the weight vector given the update for the example.

Definition at line 33 of file VwLearner.h.

Inheritance diagram for CVwLearner:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CVwLearner ()
 CVwLearner (CVwRegressor *regressor, CVwEnvironment *vw_env)
virtual ~CVwLearner ()
void register_learner_params ()
virtual void train (VwExample *&ex, float32_t update)=0
virtual const char * get_name () const

Protected Attributes

CVwRegressorreg
 Regressor object that will be used for getting updates.
CVwEnvironmentenv
 Environment.

Constructor & Destructor Documentation

CVwLearner (  ) 

Default constructor

Definition at line 39 of file VwLearner.h.

CVwLearner ( CVwRegressor regressor,
CVwEnvironment vw_env 
)

Constructor, initializes regressor and environment

Parameters:
regressor regressor
vw_env environment

Definition at line 51 of file VwLearner.h.

virtual ~CVwLearner (  )  [virtual]

Destructor

Definition at line 62 of file VwLearner.h.


Member Function Documentation

virtual const char* get_name (  )  const [virtual]

Return the name of the object

Returns:
VwLearner

Implements CSGObject.

Reimplemented in CVwAdaptiveLearner, and CVwNonAdaptiveLearner.

Definition at line 94 of file VwLearner.h.

void register_learner_params (  ) 

Add parameters to make them serializable

Definition at line 73 of file VwLearner.h.

virtual void train ( VwExample *&  ex,
float32_t  update 
) [pure virtual]

Train on the example

Parameters:
ex example
update update

Implemented in CVwAdaptiveLearner, and CVwNonAdaptiveLearner.


Member Data Documentation

CVwEnvironment* env [protected]

Environment.

Definition at line 100 of file VwLearner.h.

CVwRegressor* reg [protected]

Regressor object that will be used for getting updates.

Definition at line 98 of file VwLearner.h.


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

SHOGUN Machine Learning Toolbox - Documentation