GClasses

GClasses::GAdaBoost Class Reference

#include <GEnsemble.h>

Inheritance diagram for GClasses::GAdaBoost:
GClasses::GEnsemble GClasses::GSupervisedLearner GClasses::GTransducer

List of all members.

Public Member Functions

 GAdaBoost (GSupervisedLearner *pLearner, bool ownLearner, GLearnerLoader *pLoader)
 General purpose constructor. pLearner is the learning algorithm that you wish to boost. If ownLearner is true, then this object will delete pLearner when it is deleted. pLoader is a GLearnerLoader that can load the model you wish to boost. (If it is a custom model, then you also need to make a class that inherits from GLearnerLoader that can load your custom class.) Takes ownership of pLoader (meaning this object will delete pLoader when it is deleted).
 GAdaBoost (GDomNode *pNode, GLearnerLoader &ll)
 Deserializing constructor.
virtual ~GAdaBoost ()
virtual GDomNodeserialize (GDom *pDoc)
 Marshal this object into a DOM, which can then be converted to a variety of serial formats.
virtual void clear ()
 Deletes all of the models in this ensemble, and calls clear on the base learner.
void setTrainSize (double d)
 Specify the size of the drawn set to train with (as a factor of the training set). The default is 1.0.
void setSize (size_t n)
 Specify the size of the ensemble. The default is 30.

Static Public Member Functions

static void test ()
 Runs some unit tests related to supervised learning. Throws an exception if any problems are found.

Protected Member Functions

virtual bool canImplicitlyHandleContinuousLabels ()
 See the comment for GLearner::canImplicitlyHandleContinuousLabels.
virtual void trainInnerInner (GMatrix &features, GMatrix &labels)
 See the comment for GEnsemble::trainInnerInner.

Protected Attributes

GSupervisedLearnerm_pLearner
bool m_ownLearner
GLearnerLoaderm_pLoader
double m_trainSize
size_t m_ensembleSize

Constructor & Destructor Documentation

GClasses::GAdaBoost::GAdaBoost ( GSupervisedLearner pLearner,
bool  ownLearner,
GLearnerLoader pLoader 
)

General purpose constructor. pLearner is the learning algorithm that you wish to boost. If ownLearner is true, then this object will delete pLearner when it is deleted. pLoader is a GLearnerLoader that can load the model you wish to boost. (If it is a custom model, then you also need to make a class that inherits from GLearnerLoader that can load your custom class.) Takes ownership of pLoader (meaning this object will delete pLoader when it is deleted).

GClasses::GAdaBoost::GAdaBoost ( GDomNode pNode,
GLearnerLoader ll 
)

Deserializing constructor.

virtual GClasses::GAdaBoost::~GAdaBoost ( ) [virtual]

Member Function Documentation

virtual bool GClasses::GAdaBoost::canImplicitlyHandleContinuousLabels ( ) [inline, protected, virtual]

See the comment for GLearner::canImplicitlyHandleContinuousLabels.

Reimplemented from GClasses::GTransducer.

virtual void GClasses::GAdaBoost::clear ( ) [virtual]

Deletes all of the models in this ensemble, and calls clear on the base learner.

Implements GClasses::GSupervisedLearner.

virtual GDomNode* GClasses::GAdaBoost::serialize ( GDom pDoc) [virtual]

Marshal this object into a DOM, which can then be converted to a variety of serial formats.

Implements GClasses::GSupervisedLearner.

void GClasses::GAdaBoost::setSize ( size_t  n) [inline]

Specify the size of the ensemble. The default is 30.

void GClasses::GAdaBoost::setTrainSize ( double  d) [inline]

Specify the size of the drawn set to train with (as a factor of the training set). The default is 1.0.

static void GClasses::GAdaBoost::test ( ) [static]

Runs some unit tests related to supervised learning. Throws an exception if any problems are found.

Reimplemented from GClasses::GSupervisedLearner.

virtual void GClasses::GAdaBoost::trainInnerInner ( GMatrix features,
GMatrix labels 
) [protected, virtual]

See the comment for GEnsemble::trainInnerInner.

Implements GClasses::GEnsemble.


Member Data Documentation