GClasses
|
A manifold learning algorithm that uses back-propagation to train a neural net model to map from low-dimensional space to high-dimensional space. More...
#include <GManifold.h>
Public Member Functions | |
GUnsupervisedBackProp (size_t intrinsicDims, GRand *pRand) | |
GUnsupervisedBackProp (GDomNode *pNode, GLearnerLoader &ll) | |
virtual | ~GUnsupervisedBackProp () |
GDomNode * | serialize (GDom *pDoc) |
Marshall this object to a DOM that can be serialized. | |
GNeuralNet * | neuralNet () |
Returns a pointer to the neural network used to model the manifold. Typically, this is used to add layers to the neural network, or set the learning rate (etc.) before calling doit. | |
void | setNeuralNet (GNeuralNet *pNN) |
Takes ownership of pNN. Replaces the internal neural net with the one specified. This method assumes that pNN has already been trained. If m_updateWeights is true, then it will further-refinde this model when doit is called. (You can pass NULL to this method to discard the current model, so that a new model will be trained next time doit is called.) | |
void | setParams (std::vector< size_t > ¶mRanges) |
Parameterize the output values. This feature is typically used when the output is an image, and the width and height are specified for the paramRanges. | |
void | setIntrinsic (GMatrix *pIntrinsic) |
Specify initial values for the intrinsic variables. This method takes ownership of pIntrinsic. If this method is not called prior to "doit", then the intrinsic variables will be initialized with small random values. | |
virtual GMatrix * | doit (GMatrix &in) |
Perform NLDR. (This also trains the internal neural network to map from low-dimensional space to high-dimensional space.) Returns a pointer to the intrinsic values (which you are responsible to delete). | |
void | setUseInputBias (bool b) |
Specify whether to use one of the input values as a bias. | |
void | setJitterer (GImageJitterer *pJitterer) |
Takes ownership of pJitterer. Specify an image jitterer to use during training to make it robust to rotation, translation, and scale. If an image jitterer is used, then there must be exactly two dimensional parameters, and the parameters used to construct the image jitterer must be consistent with those used to construct this object. | |
GImageJitterer * | jitterer () |
Returns the current image jitterer. | |
void | hiToLow (const double *pIn, double *pOut) |
Given a high-dimensional vector, computes and returns a corresponding low-dimensional vector. | |
void | lowToHi (const double *pIn, double *pOut) |
Given a low-dimensional vector, computes and returns the corresponding high-dimensional vector. | |
double * | mins () |
double * | ranges () |
void | useJitterer () |
GMatrix & | progress () |
void | trackProgress () |
size_t | featureDims () |
size_t | labelDims () |
Protected Attributes | |
size_t | m_paramDims |
size_t * | m_pParamRanges |
size_t | m_jitterDims |
size_t | m_intrinsicDims |
GNeuralNet * | m_pNN |
GNeuralNet * | m_pRevNN |
GRand * | m_pRand |
GCoordVectorIterator | m_cvi |
bool | m_useInputBias |
GImageJitterer * | m_pJitterer |
GMatrix * | m_pIntrinsic |
double * | m_pMins |
double * | m_pRanges |
GMatrix * | m_pProgress |
A manifold learning algorithm that uses back-propagation to train a neural net model to map from low-dimensional space to high-dimensional space.
GClasses::GUnsupervisedBackProp::GUnsupervisedBackProp | ( | size_t | intrinsicDims, |
GRand * | pRand | ||
) |
GClasses::GUnsupervisedBackProp::GUnsupervisedBackProp | ( | GDomNode * | pNode, |
GLearnerLoader & | ll | ||
) |
virtual GClasses::GUnsupervisedBackProp::~GUnsupervisedBackProp | ( | ) | [virtual] |
Perform NLDR. (This also trains the internal neural network to map from low-dimensional space to high-dimensional space.) Returns a pointer to the intrinsic values (which you are responsible to delete).
Implements GClasses::GTransform.
size_t GClasses::GUnsupervisedBackProp::featureDims | ( | ) | [inline] |
void GClasses::GUnsupervisedBackProp::hiToLow | ( | const double * | pIn, |
double * | pOut | ||
) |
Given a high-dimensional vector, computes and returns a corresponding low-dimensional vector.
GImageJitterer* GClasses::GUnsupervisedBackProp::jitterer | ( | ) | [inline] |
Returns the current image jitterer.
size_t GClasses::GUnsupervisedBackProp::labelDims | ( | ) |
void GClasses::GUnsupervisedBackProp::lowToHi | ( | const double * | pIn, |
double * | pOut | ||
) |
Given a low-dimensional vector, computes and returns the corresponding high-dimensional vector.
double* GClasses::GUnsupervisedBackProp::mins | ( | ) |
GNeuralNet* GClasses::GUnsupervisedBackProp::neuralNet | ( | ) | [inline] |
Returns a pointer to the neural network used to model the manifold. Typically, this is used to add layers to the neural network, or set the learning rate (etc.) before calling doit.
GMatrix& GClasses::GUnsupervisedBackProp::progress | ( | ) | [inline] |
double* GClasses::GUnsupervisedBackProp::ranges | ( | ) |
Marshall this object to a DOM that can be serialized.
void GClasses::GUnsupervisedBackProp::setIntrinsic | ( | GMatrix * | pIntrinsic | ) |
Specify initial values for the intrinsic variables. This method takes ownership of pIntrinsic. If this method is not called prior to "doit", then the intrinsic variables will be initialized with small random values.
void GClasses::GUnsupervisedBackProp::setJitterer | ( | GImageJitterer * | pJitterer | ) |
Takes ownership of pJitterer. Specify an image jitterer to use during training to make it robust to rotation, translation, and scale. If an image jitterer is used, then there must be exactly two dimensional parameters, and the parameters used to construct the image jitterer must be consistent with those used to construct this object.
void GClasses::GUnsupervisedBackProp::setNeuralNet | ( | GNeuralNet * | pNN | ) |
Takes ownership of pNN. Replaces the internal neural net with the one specified. This method assumes that pNN has already been trained. If m_updateWeights is true, then it will further-refinde this model when doit is called. (You can pass NULL to this method to discard the current model, so that a new model will be trained next time doit is called.)
void GClasses::GUnsupervisedBackProp::setParams | ( | std::vector< size_t > & | paramRanges | ) |
Parameterize the output values. This feature is typically used when the output is an image, and the width and height are specified for the paramRanges.
void GClasses::GUnsupervisedBackProp::setUseInputBias | ( | bool | b | ) | [inline] |
Specify whether to use one of the input values as a bias.
void GClasses::GUnsupervisedBackProp::trackProgress | ( | ) |
void GClasses::GUnsupervisedBackProp::useJitterer | ( | ) | [inline] |
size_t GClasses::GUnsupervisedBackProp::m_intrinsicDims [protected] |
size_t GClasses::GUnsupervisedBackProp::m_jitterDims [protected] |
size_t GClasses::GUnsupervisedBackProp::m_paramDims [protected] |
GMatrix* GClasses::GUnsupervisedBackProp::m_pIntrinsic [protected] |
double* GClasses::GUnsupervisedBackProp::m_pMins [protected] |
GNeuralNet* GClasses::GUnsupervisedBackProp::m_pNN [protected] |
size_t* GClasses::GUnsupervisedBackProp::m_pParamRanges [protected] |
GMatrix* GClasses::GUnsupervisedBackProp::m_pProgress [protected] |
GRand* GClasses::GUnsupervisedBackProp::m_pRand [protected] |
double* GClasses::GUnsupervisedBackProp::m_pRanges [protected] |
GNeuralNet* GClasses::GUnsupervisedBackProp::m_pRevNN [protected] |
bool GClasses::GUnsupervisedBackProp::m_useInputBias [protected] |