GClasses
|
#include <GTransform.h>
Public Member Functions | |
GImputeMissingVals (GRand &rand) | |
General-purpose constructor. | |
GImputeMissingVals (GDomNode *pNode, GLearnerLoader &ll) | |
Deserializing constructor. | |
virtual | ~GImputeMissingVals () |
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. | |
void | setCollaborativeFilter (GCollaborativeFilter *pCF) |
Sets the collaborative filter used to impute missing values. Takes ownership of pCF. If no collaborative filter is set, the default is to use matrix factorization with some typical parameters. | |
void | setLabels (GMatrix *pLabels) |
Specify a label matrix that should be appended with the training data. This object will not delete pLabels. It is expected that pLabels will remain valid at least until after train is next called. | |
virtual GMatrix * | transformBatch (GMatrix &in) |
Unlike most other transforms, this one assumes that the matrix passed to this method is the same that was used to train it. (This assumption is necessary in order to utilize the additional label information that may be available at training time, which can be important for imputation.) | |
Protected Attributes | |
GCollaborativeFilter * | m_pCF |
GNominalToCat * | m_pNTC |
GRand & | m_rand |
GMatrix * | m_pLabels |
GMatrix * | m_pBatch |
GClasses::GImputeMissingVals::GImputeMissingVals | ( | GRand & | rand | ) |
General-purpose constructor.
GClasses::GImputeMissingVals::GImputeMissingVals | ( | GDomNode * | pNode, |
GLearnerLoader & | ll | ||
) |
Deserializing constructor.
virtual GClasses::GImputeMissingVals::~GImputeMissingVals | ( | ) | [virtual] |
Marshal this object into a DOM, which can then be converted to a variety of serial formats.
Implements GClasses::GIncrementalTransform.
void GClasses::GImputeMissingVals::setCollaborativeFilter | ( | GCollaborativeFilter * | pCF | ) |
Sets the collaborative filter used to impute missing values. Takes ownership of pCF. If no collaborative filter is set, the default is to use matrix factorization with some typical parameters.
void GClasses::GImputeMissingVals::setLabels | ( | GMatrix * | pLabels | ) |
Specify a label matrix that should be appended with the training data. This object will not delete pLabels. It is expected that pLabels will remain valid at least until after train is next called.
virtual void GClasses::GImputeMissingVals::train | ( | GMatrix & | data | ) | [virtual] |
See the comment for GIncrementalTransform::train.
Implements GClasses::GIncrementalTransform.
virtual void GClasses::GImputeMissingVals::transform | ( | const double * | pIn, |
double * | pOut | ||
) | [virtual] |
See the comment for GIncrementalTransform::transform.
Implements GClasses::GIncrementalTransform.
Unlike most other transforms, this one assumes that the matrix passed to this method is the same that was used to train it. (This assumption is necessary in order to utilize the additional label information that may be available at training time, which can be important for imputation.)
Reimplemented from GClasses::GIncrementalTransform.
virtual void GClasses::GImputeMissingVals::untransform | ( | const double * | pIn, |
double * | pOut | ||
) | [virtual] |
See the comment for GTwoWayIncrementalTransform::untransform.
Implements GClasses::GTwoWayIncrementalTransform.
virtual void GClasses::GImputeMissingVals::untransformToDistribution | ( | const double * | pIn, |
GPrediction * | pOut | ||
) | [virtual] |
See the comment for GTwoWayIncrementalTransform::untransformToDistribution.
Implements GClasses::GTwoWayIncrementalTransform.
GMatrix* GClasses::GImputeMissingVals::m_pBatch [protected] |
GCollaborativeFilter* GClasses::GImputeMissingVals::m_pCF [protected] |
GMatrix* GClasses::GImputeMissingVals::m_pLabels [protected] |
GNominalToCat* GClasses::GImputeMissingVals::m_pNTC [protected] |
GRand& GClasses::GImputeMissingVals::m_rand [protected] |