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 () |
size_t | featureDims () |
void | hiToLow (const double *pIn, double *pOut) |
Given a high-dimensional vector, computes and returns a corresponding low-dimensional vector. More... | |
GImageJitterer * | jitterer () |
Returns the current image jitterer. More... | |
size_t | labelDims () |
void | lowToHi (const double *pIn, double *pOut) |
Given a low-dimensional vector, computes and returns the corresponding high-dimensional vector. More... | |
double * | mins () |
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 reduce. (You must add at least one layer.) More... | |
void | onePass () |
Use only single-pass training. More... | |
GMatrix & | progress () |
double * | ranges () |
virtual GMatrix * | reduce (const 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). More... | |
GDomNode * | serialize (GDom *pDoc) const |
Marshall this object to a DOM that can be serialized. More... | |
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 "reduce", then the intrinsic variables will be initialized with small random values. More... | |
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. More... | |
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 reduce is called. (You can pass NULL to this method to discard the current model, so that a new model will be trained next time reduce is called.) More... | |
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. More... | |
void | setUseInputBias (bool b) |
Specify whether to use one of the input values as a bias. More... | |
void | trackProgress () |
void | useJitterer () |
![]() | |
GTransform () | |
GTransform (GDomNode *pNode, GLearnerLoader &ll) | |
virtual | ~GTransform () |
Protected Attributes | |
GCoordVectorIterator | m_cvi |
size_t | m_intrinsicDims |
size_t | m_jitterDims |
bool | m_onePass |
size_t | m_paramDims |
GMatrix * | m_pIntrinsic |
GImageJitterer * | m_pJitterer |
double * | m_pMins |
GNeuralNet * | m_pNN |
size_t * | m_pParamRanges |
GMatrix * | m_pProgress |
double * | m_pRanges |
bool | m_useInputBias |
Additional Inherited Members | |
![]() | |
virtual GDomNode * | baseDomNode (GDom *pDoc, const char *szClassName) const |
Child classes should use this in their implementation of serialize. More... | |
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 |
|
inline |
void GClasses::GUnsupervisedBackProp::hiToLow | ( | const double * | pIn, |
double * | pOut | ||
) |
Given a high-dimensional vector, computes and returns a corresponding low-dimensional vector.
|
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 | ( | ) |
|
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 reduce. (You must add at least one layer.)
|
inline |
Use only single-pass training.
|
inline |
double* GClasses::GUnsupervisedBackProp::ranges | ( | ) |
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.
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 "reduce", 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 reduce is called. (You can pass NULL to this method to discard the current model, so that a new model will be trained next time reduce 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.
|
inline |
Specify whether to use one of the input values as a bias.
void GClasses::GUnsupervisedBackProp::trackProgress | ( | ) |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |