GClasses
|
This transform uses buckets to convert continuous data into discrete data. It is common to use GFilter to combine this with your favorite modeler (which only supports discrete values) to create a modeler that can also support continuous values as well. More...
#include <GTransform.h>
Public Member Functions | |
GDiscretize (size_t buckets=(size_t)-1) | |
if buckets is less than 0, then it will use the floor of the square root of the number of rows in the data | |
GDiscretize (GDomNode *pNode, GLearnerLoader &ll) | |
Load from a DOM. | |
virtual | ~GDiscretize () |
virtual GDomNode * | serialize (GDom *pDoc) |
Marshal this object into a DOM, which can then be converted to a variety of serial formats. | |
virtual void | train (GMatrix &data) |
See the comment for GIncrementalTransform::train. | |
virtual void | transform (const double *pIn, double *pOut) |
See the comment for GIncrementalTransform::transform. | |
virtual void | untransform (const double *pIn, double *pOut) |
See the comment for GTwoWayIncrementalTransform::untransform. | |
virtual void | untransformToDistribution (const double *pIn, GPrediction *pOut) |
See the comment for GTwoWayIncrementalTransform::untransformToDistribution. | |
Protected Attributes | |
size_t | m_bucketsIn |
size_t | m_bucketsOut |
double * | m_pMins |
double * | m_pRanges |
This transform uses buckets to convert continuous data into discrete data. It is common to use GFilter to combine this with your favorite modeler (which only supports discrete values) to create a modeler that can also support continuous values as well.
GClasses::GDiscretize::GDiscretize | ( | size_t | buckets = (size_t)-1 | ) |
if buckets is less than 0, then it will use the floor of the square root of the number of rows in the data
GClasses::GDiscretize::GDiscretize | ( | GDomNode * | pNode, |
GLearnerLoader & | ll | ||
) |
Load from a DOM.
virtual GClasses::GDiscretize::~GDiscretize | ( | ) | [virtual] |
Marshal this object into a DOM, which can then be converted to a variety of serial formats.
Implements GClasses::GIncrementalTransform.
virtual void GClasses::GDiscretize::train | ( | GMatrix & | data | ) | [virtual] |
See the comment for GIncrementalTransform::train.
Implements GClasses::GIncrementalTransform.
virtual void GClasses::GDiscretize::transform | ( | const double * | pIn, |
double * | pOut | ||
) | [virtual] |
See the comment for GIncrementalTransform::transform.
Implements GClasses::GIncrementalTransform.
virtual void GClasses::GDiscretize::untransform | ( | const double * | pIn, |
double * | pOut | ||
) | [virtual] |
See the comment for GTwoWayIncrementalTransform::untransform.
Implements GClasses::GTwoWayIncrementalTransform.
virtual void GClasses::GDiscretize::untransformToDistribution | ( | const double * | pIn, |
GPrediction * | pOut | ||
) | [virtual] |
See the comment for GTwoWayIncrementalTransform::untransformToDistribution.
Implements GClasses::GTwoWayIncrementalTransform.
size_t GClasses::GDiscretize::m_bucketsIn [protected] |
size_t GClasses::GDiscretize::m_bucketsOut [protected] |
double* GClasses::GDiscretize::m_pMins [protected] |
double* GClasses::GDiscretize::m_pRanges [protected] |