GClasses
|
This regresses a multi-dimensional polynomial to fit the data. More...
#include <GPolynomial.h>
Public Member Functions | |
GPolynomial (GRand &rand) | |
It will have the same number of control points in every feature dimension. | |
GPolynomial (GDomNode *pNode, GLearnerLoader &ll) | |
Load from a DOM. | |
virtual | ~GPolynomial () |
void | setControlPoints (size_t n) |
Set the number of control points in the Bezier representation of the polynomial (which is one more than the polynomial order). The default is 3. | |
size_t | controlPoints () |
Returns the number of control points. | |
void | autoTune (GMatrix &features, GMatrix &labels) |
Uses cross-validation to find a set of parameters that works well with the provided data. | |
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. | |
Static Public Member Functions | |
static void | test () |
Performs unit tests for this class. Throws an exception if there is a failure. | |
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. | |
virtual bool | canImplicitlyHandleNominalFeatures () |
See the comment for GTransducer::canImplicitlyHandleNominalFeatures. | |
virtual bool | canImplicitlyHandleNominalLabels () |
See the comment for GTransducer::canImplicitlyHandleNominalLabels. | |
Protected Attributes | |
size_t | m_controlPoints |
std::vector < GPolynomialSingleLabel * > | m_polys |
This regresses a multi-dimensional polynomial to fit the data.
GClasses::GPolynomial::GPolynomial | ( | GRand & | rand | ) |
It will have the same number of control points in every feature dimension.
GClasses::GPolynomial::GPolynomial | ( | GDomNode * | pNode, |
GLearnerLoader & | ll | ||
) |
Load from a DOM.
virtual GClasses::GPolynomial::~GPolynomial | ( | ) | [virtual] |
Uses cross-validation to find a set of parameters that works well with the provided data.
virtual bool GClasses::GPolynomial::canImplicitlyHandleNominalFeatures | ( | ) | [inline, protected, virtual] |
See the comment for GTransducer::canImplicitlyHandleNominalFeatures.
Reimplemented from GClasses::GTransducer.
virtual bool GClasses::GPolynomial::canImplicitlyHandleNominalLabels | ( | ) | [inline, protected, virtual] |
See the comment for GTransducer::canImplicitlyHandleNominalLabels.
Reimplemented from GClasses::GTransducer.
virtual void GClasses::GPolynomial::clear | ( | ) | [virtual] |
See the comment for GSupervisedLearner::clear.
Implements GClasses::GSupervisedLearner.
size_t GClasses::GPolynomial::controlPoints | ( | ) |
Returns the number of control points.
virtual void GClasses::GPolynomial::predictDistributionInner | ( | const double * | pIn, |
GPrediction * | pOut | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::predictDistributionInner.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GPolynomial::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.
void GClasses::GPolynomial::setControlPoints | ( | size_t | n | ) |
Set the number of control points in the Bezier representation of the polynomial (which is one more than the polynomial order). The default is 3.
static void GClasses::GPolynomial::test | ( | ) | [static] |
Performs unit tests for this class. Throws an exception if there is a failure.
Reimplemented from GClasses::GSupervisedLearner.
virtual void GClasses::GPolynomial::trainInner | ( | GMatrix & | features, |
GMatrix & | labels | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::trainInner.
Implements GClasses::GSupervisedLearner.
size_t GClasses::GPolynomial::m_controlPoints [protected] |
std::vector<GPolynomialSingleLabel*> GClasses::GPolynomial::m_polys [protected] |