GClasses
|
A GMeanMarginsTree is an oblique decision tree specified in Gashler, Michael S. and Giraud-Carrier, Christophe and Martinez, Tony. Decision Tree Ensemble: Small Heterogeneous Is Better Than Large Homogeneous. In The Seventh International Conference on Machine Learning and Applications, Pages 900 - 905, ICMLA '08. 2008. It divides features as follows: It finds the mean and principle component of the output vectors. It divides all the vectors into two groups, one that has a positive dot-product with the principle component (after subtracting the mean) and one that has a negative dot-product with the principle component (after subtracting the mean). Next it finds the average input vector for each of the two groups. Then it finds the mean and principle component of those two vectors. The dividing criteria for this node is to subtract the mean and then see whether the dot-product with the principle component is positive or negative. More...
#include <GDecisionTree.h>
Public Member Functions | |
GMeanMarginsTree (GRand &rand) | |
nOutputs specifies the number of output dimensions | |
GMeanMarginsTree (GDomNode *pNode, GLearnerLoader &ll) | |
Load from a DOM. | |
virtual | ~GMeanMarginsTree () |
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 | |
GMeanMarginsTreeNode * | buildNode (GMatrix &features, GMatrix &labels, double *pBuf, size_t *pBuf2) |
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. | |
virtual bool | canImplicitlyHandleNominalFeatures () |
See the comment for GTransducer::canImplicitlyHandleNominalFeatures. | |
virtual bool | canImplicitlyHandleNominalLabels () |
See the comment for GTransducer::canImplicitlyHandleNominalLabels. | |
Protected Attributes | |
size_t | m_internalFeatureDims |
size_t | m_internalLabelDims |
GMeanMarginsTreeNode * | m_pRoot |
A GMeanMarginsTree is an oblique decision tree specified in Gashler, Michael S. and Giraud-Carrier, Christophe and Martinez, Tony. Decision Tree Ensemble: Small Heterogeneous Is Better Than Large Homogeneous. In The Seventh International Conference on Machine Learning and Applications, Pages 900 - 905, ICMLA '08. 2008. It divides features as follows: It finds the mean and principle component of the output vectors. It divides all the vectors into two groups, one that has a positive dot-product with the principle component (after subtracting the mean) and one that has a negative dot-product with the principle component (after subtracting the mean). Next it finds the average input vector for each of the two groups. Then it finds the mean and principle component of those two vectors. The dividing criteria for this node is to subtract the mean and then see whether the dot-product with the principle component is positive or negative.
GClasses::GMeanMarginsTree::GMeanMarginsTree | ( | GRand & | rand | ) |
nOutputs specifies the number of output dimensions
GClasses::GMeanMarginsTree::GMeanMarginsTree | ( | GDomNode * | pNode, |
GLearnerLoader & | ll | ||
) |
Load from a DOM.
virtual GClasses::GMeanMarginsTree::~GMeanMarginsTree | ( | ) | [virtual] |
This model has no parameters to tune, so this method is a noop.
GMeanMarginsTreeNode* GClasses::GMeanMarginsTree::buildNode | ( | GMatrix & | features, |
GMatrix & | labels, | ||
double * | pBuf, | ||
size_t * | pBuf2 | ||
) | [protected] |
virtual bool GClasses::GMeanMarginsTree::canImplicitlyHandleNominalFeatures | ( | ) | [inline, protected, virtual] |
See the comment for GTransducer::canImplicitlyHandleNominalFeatures.
Reimplemented from GClasses::GTransducer.
virtual bool GClasses::GMeanMarginsTree::canImplicitlyHandleNominalLabels | ( | ) | [inline, protected, virtual] |
See the comment for GTransducer::canImplicitlyHandleNominalLabels.
Reimplemented from GClasses::GTransducer.
virtual void GClasses::GMeanMarginsTree::clear | ( | ) | [virtual] |
See the comment for GSupervisedLearner::clear.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GMeanMarginsTree::predictDistributionInner | ( | const double * | pIn, |
GPrediction * | pOut | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::predictDistributionInner.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GMeanMarginsTree::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::GMeanMarginsTree::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::GMeanMarginsTree::trainInner | ( | GMatrix & | features, |
GMatrix & | labels | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::trainInner.
Implements GClasses::GSupervisedLearner.
size_t GClasses::GMeanMarginsTree::m_internalFeatureDims [protected] |
size_t GClasses::GMeanMarginsTree::m_internalLabelDims [protected] |
GMeanMarginsTreeNode* GClasses::GMeanMarginsTree::m_pRoot [protected] |