|
SHOGUN
v1.1.0
|
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.

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 |
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) |
Protected Attributes | |
| CVwRegressor * | reg |
| Regressor object that will be used for getting updates. | |
| CVwEnvironment * | env |
| Environment. | |
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 CSGObject | |
| 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) |
| CVwLearner | ( | ) |
Default constructor
Definition at line 39 of file VwLearner.h.
| CVwLearner | ( | CVwRegressor * | regressor, |
| CVwEnvironment * | vw_env | ||
| ) |
Constructor, initializes regressor and environment
| regressor | regressor |
| vw_env | environment |
Definition at line 51 of file VwLearner.h.
|
virtual |
Destructor
Definition at line 62 of file VwLearner.h.
|
virtual |
Return the name of the object
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.
Train on the example
| ex | example |
| update | update |
Implemented in CVwAdaptiveLearner, and CVwNonAdaptiveLearner.
|
protected |
Environment.
Definition at line 100 of file VwLearner.h.
|
protected |
Regressor object that will be used for getting updates.
Definition at line 98 of file VwLearner.h.