GClasses

GClasses::GImputeMissingVals Class Reference

#include <GTransform.h>

Inheritance diagram for GClasses::GImputeMissingVals:
GClasses::GTwoWayIncrementalTransform GClasses::GIncrementalTransform GClasses::GTransform

List of all members.

Public Member Functions

 GImputeMissingVals (GRand &rand)
 General-purpose constructor.
 GImputeMissingVals (GDomNode *pNode, GLearnerLoader &ll)
 Deserializing constructor.
virtual ~GImputeMissingVals ()
virtual GDomNodeserialize (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 GMatrixtransformBatch (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

GCollaborativeFilterm_pCF
GNominalToCatm_pNTC
GRandm_rand
GMatrixm_pLabels
GMatrixm_pBatch

Constructor & Destructor Documentation

GClasses::GImputeMissingVals::GImputeMissingVals ( GRand rand)

General-purpose constructor.

GClasses::GImputeMissingVals::GImputeMissingVals ( GDomNode pNode,
GLearnerLoader ll 
)

Deserializing constructor.

virtual GClasses::GImputeMissingVals::~GImputeMissingVals ( ) [virtual]

Member Function Documentation

virtual GDomNode* GClasses::GImputeMissingVals::serialize ( GDom pDoc) [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]
virtual void GClasses::GImputeMissingVals::transform ( const double *  pIn,
double *  pOut 
) [virtual]
virtual GMatrix* GClasses::GImputeMissingVals::transformBatch ( GMatrix in) [virtual]

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]
virtual void GClasses::GImputeMissingVals::untransformToDistribution ( const double *  pIn,
GPrediction pOut 
) [virtual]

Member Data Documentation