GClasses
|
Always outputs the label mean (for continuous labels) and the most common class (for nominal labels). More...
#include <GLearner.h>
Public Member Functions | |
GBaselineLearner (GRand &rand) | |
General-purpose constructor. | |
GBaselineLearner (GDomNode *pNode, GLearnerLoader &ll) | |
Deserialization constructor. | |
virtual | ~GBaselineLearner () |
Destructor. | |
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 () |
See the comment for GSupervisedLearner::clear. | |
void | autoTune (GMatrix &features, GMatrix &labels) |
This model has no parameters to tune, so this method is a noop. | |
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 void | trainInner (GMatrix &features, GMatrix &labels) |
See the comment for GSupervisedLearner::trainInner. | |
virtual void | predictInner (const double *pIn, double *pOut) |
See the comment for GSupervisedLearner::predictInner. | |
virtual void | predictDistributionInner (const double *pIn, GPrediction *pOut) |
See the comment for GSupervisedLearner::predictDistributionInner. | |
Protected Attributes | |
std::vector< double > | m_prediction |
Always outputs the label mean (for continuous labels) and the most common class (for nominal labels).
GClasses::GBaselineLearner::GBaselineLearner | ( | GRand & | rand | ) |
General-purpose constructor.
GClasses::GBaselineLearner::GBaselineLearner | ( | GDomNode * | pNode, |
GLearnerLoader & | ll | ||
) |
Deserialization constructor.
virtual GClasses::GBaselineLearner::~GBaselineLearner | ( | ) | [virtual] |
Destructor.
This model has no parameters to tune, so this method is a noop.
virtual void GClasses::GBaselineLearner::clear | ( | ) | [virtual] |
See the comment for GSupervisedLearner::clear.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GBaselineLearner::predictDistributionInner | ( | const double * | pIn, |
GPrediction * | pOut | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::predictDistributionInner.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GBaselineLearner::predictInner | ( | const double * | pIn, |
double * | pOut | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::predictInner.
Implements GClasses::GSupervisedLearner.
Marshal this object into a DOM, which can then be converted to a variety of serial formats.
Implements GClasses::GSupervisedLearner.
static void GClasses::GBaselineLearner::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::GBaselineLearner::trainInner | ( | GMatrix & | features, |
GMatrix & | labels | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::trainInner.
Implements GClasses::GSupervisedLearner.
std::vector<double> GClasses::GBaselineLearner::m_prediction [protected] |