GClasses
|
This represents a grid of values. It might be useful as a Q-table with Q-learning. More...
#include <GKNN.h>
Public Member Functions | |
GInstanceTable (size_t dims, size_t *pDims, GRand &rand) | |
dims specifies the number of feature dimensions. pDims specifies the number of discrete zero-based values for each feature dim. | |
virtual | ~GInstanceTable () |
virtual GDomNode * | serialize (GDom *pDoc) |
Serialize this table. | |
virtual void | trainSparse (GSparseMatrix &features, GMatrix &labels) |
See the comment for GIncrementalLearner::trainSparse. | |
virtual void | clear () |
Clears the internal model. | |
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 void | beginIncrementalLearningInner (sp_relation &pFeatureRel, sp_relation &pLabelRel) |
See the comment for GIncrementalLearner::beginIncrementalLearningInner. | |
virtual void | trainIncrementalInner (const double *pIn, const double *pOut) |
See the comment for GIncrementalLearner::trainIncrementalInner. | |
Protected Attributes | |
size_t | m_dims |
size_t * | m_pDims |
size_t * | m_pScales |
double * | m_pTable |
size_t | m_product |
This represents a grid of values. It might be useful as a Q-table with Q-learning.
GClasses::GInstanceTable::GInstanceTable | ( | size_t | dims, |
size_t * | pDims, | ||
GRand & | rand | ||
) |
dims specifies the number of feature dimensions. pDims specifies the number of discrete zero-based values for each feature dim.
virtual GClasses::GInstanceTable::~GInstanceTable | ( | ) | [virtual] |
virtual void GClasses::GInstanceTable::beginIncrementalLearningInner | ( | sp_relation & | pFeatureRel, |
sp_relation & | pLabelRel | ||
) | [protected, virtual] |
See the comment for GIncrementalLearner::beginIncrementalLearningInner.
Implements GClasses::GIncrementalLearner.
virtual bool GClasses::GInstanceTable::canImplicitlyHandleNominalFeatures | ( | ) | [inline, protected, virtual] |
See the comment for GTransducer::canImplicitlyHandleNominalFeatures.
Reimplemented from GClasses::GTransducer.
virtual void GClasses::GInstanceTable::clear | ( | ) | [virtual] |
Clears the internal model.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GInstanceTable::predictDistributionInner | ( | const double * | pIn, |
GPrediction * | pOut | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::predictDistributionInner.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GInstanceTable::predictInner | ( | const double * | pIn, |
double * | pOut | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::predictInner.
Implements GClasses::GSupervisedLearner.
Serialize this table.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GInstanceTable::trainIncrementalInner | ( | const double * | pIn, |
const double * | pOut | ||
) | [protected, virtual] |
See the comment for GIncrementalLearner::trainIncrementalInner.
Implements GClasses::GIncrementalLearner.
virtual void GClasses::GInstanceTable::trainInner | ( | GMatrix & | features, |
GMatrix & | labels | ||
) | [protected, virtual] |
See the comment for GSupervisedLearner::trainInner.
Implements GClasses::GSupervisedLearner.
virtual void GClasses::GInstanceTable::trainSparse | ( | GSparseMatrix & | features, |
GMatrix & | labels | ||
) | [virtual] |
See the comment for GIncrementalLearner::trainSparse.
Implements GClasses::GIncrementalLearner.
size_t GClasses::GInstanceTable::m_dims [protected] |
size_t* GClasses::GInstanceTable::m_pDims [protected] |
size_t GClasses::GInstanceTable::m_product [protected] |
size_t* GClasses::GInstanceTable::m_pScales [protected] |
double* GClasses::GInstanceTable::m_pTable [protected] |