GClasses
|
#include <GEnsemble.h>
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 GDomNode * | serialize (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 | |
GSupervisedLearner * | m_pLearner |
bool | m_ownLearner |
GLearnerLoader * | m_pLoader |
double | m_trainSize |
size_t | m_ensembleSize |
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] |
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.
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.
size_t GClasses::GAdaBoost::m_ensembleSize [protected] |
bool GClasses::GAdaBoost::m_ownLearner [protected] |
GSupervisedLearner* GClasses::GAdaBoost::m_pLearner [protected] |
GLearnerLoader* GClasses::GAdaBoost::m_pLoader [protected] |
double GClasses::GAdaBoost::m_trainSize [protected] |