GClasses
|
Manifold Sculpting. A non-linear dimensionality reduction algorithm. (See Gashler, Michael S. and Ventura, Dan and Martinez, Tony. Iterative non-linear dimensionality reduction with manifold sculpting. In Advances in Neural Information Processing Systems 20, pages 513–520, MIT Press, Cambridge, MA, 2008.)
#include <GManifold.h>
Public Member Functions | |
GManifoldSculpting (size_t nNeighbors, size_t targetDims, GRand *pRand) | |
virtual | ~GManifoldSculpting () |
double | aveNeighborDist () |
Returns the average distance between neighbors. More... | |
void | beginTransform (const GMatrix *pRealSpaceData) |
Call this before calling SquishPass. pRealSpaceData should be a dataset of all real values. More... | |
void | clampPoint (size_t n) |
Partially supervise the specified point. More... | |
size_t | countShortcuts (size_t nThreshold) |
Counts the number of times that a point has a neighbor with an index that is >= nThreshold away from this points index. (If the manifold is sampled in order such that points are expected to find neighbors with indexes close to their own, this can serve to identify when parts of the manifold are too close to other parts for so many neighbors to be used.) More... | |
GMatrix & | data () |
double | learningRate () |
Returns the current learning rate. More... | |
virtual GMatrix * | reduce (const GMatrix &in) |
Perform NLDR. More... | |
const GRelation & | relationAfter () |
void | setMinAndMaxNeighborDist (double min, double max) |
Neighbors that are closer than min or farther than max will be ignored. The default is [0, 1e20]. It is common to make nNeighbors big and max small so that the hyper-sphere will define the neighborhood. More... | |
void | setNeighborFinder (GNeighborFinderGeneralizing *pNF) |
Specifies to use the neighborhoods determined by the specified neighbor-finder instead of the nearest Euclidean-distance neighbors. If this method is called, pNF should have the same number of neighbors and the same dataset as is passed into this class. More... | |
void | setPreprocessedData (GMatrix *pData) |
This will takes ownership of pData. (It will modify pData too.) Specifies reduced dimensionality data created by another algorithm, which should be refined using Manifold Sculpting. More... | |
void | setSquishingRate (double d) |
Set the rate of squishing. (.99 is a good value) More... | |
double | squishPass (size_t nSeedDataPoint) |
Perform one iteration of squishing. Returns a heuristical error value. More... | |
Public Member Functions inherited from GClasses::GTransform | |
GTransform () | |
GTransform (const GDomNode *pNode) | |
virtual | ~GTransform () |
Protected Member Functions | |
size_t | adjustDataPoint (size_t nPoint, double *pError) |
double | averageNeighborDistance (size_t nDims) |
void | calculateMetadata (const GMatrix *pData) |
double | computeError (size_t nPoint) |
void | moveMeanToOrigin () |
struct GManifoldSculptingNeighbor * | record (size_t n) |
struct GManifoldSculptingStuff * | stuff (size_t n) |
virtual double | supervisedError (size_t nPoint) |
You can overload this to add some intelligent supervision to the heuristic. More... | |
double | vectorCorrelation (const double *pdA, const double *pdV, const double *pdB) |
double | vectorCorrelation2 (double squaredScale, size_t a, size_t vertex, struct GManifoldSculptingNeighbor *pNeighborRec) |
Protected Member Functions inherited from GClasses::GTransform | |
virtual GDomNode * | baseDomNode (GDom *pDoc, const char *szClassName) const |
Child classes should use this in their implementation of serialize. More... | |
Protected Attributes | |
double | m_dAveNeighborDist |
double | m_dLearningRate |
double | m_dSquishingRate |
double | m_maxNeighborDist |
double | m_minNeighborDist |
size_t | m_nCurrentDimension |
size_t | m_nDimensions |
size_t | m_nNeighbors |
size_t | m_nPass |
size_t | m_nRecordSize |
size_t | m_nStuffIndex |
size_t | m_nTargetDims |
GMatrix * | m_pData |
unsigned char * | m_pMetaData |
GNeighborFinderGeneralizing * | m_pNF |
GRand * | m_pRand |
GRelation * | m_pRelationAfter |
std::deque< size_t > | m_q |
double | m_scale |
GClasses::GManifoldSculpting::GManifoldSculpting | ( | size_t | nNeighbors, |
size_t | targetDims, | ||
GRand * | pRand | ||
) |
|
virtual |
|
protected |
|
inline |
Returns the average distance between neighbors.
|
protected |
void GClasses::GManifoldSculpting::beginTransform | ( | const GMatrix * | pRealSpaceData | ) |
Call this before calling SquishPass. pRealSpaceData should be a dataset of all real values.
|
protected |
void GClasses::GManifoldSculpting::clampPoint | ( | size_t | n | ) |
Partially supervise the specified point.
|
protected |
size_t GClasses::GManifoldSculpting::countShortcuts | ( | size_t | nThreshold | ) |
Counts the number of times that a point has a neighbor with an index that is >= nThreshold away from this points index. (If the manifold is sampled in order such that points are expected to find neighbors with indexes close to their own, this can serve to identify when parts of the manifold are too close to other parts for so many neighbors to be used.)
|
inline |
|
inline |
Returns the current learning rate.
|
protected |
|
inlineprotected |
Perform NLDR.
Implements GClasses::GTransform.
|
inline |
|
inline |
Neighbors that are closer than min or farther than max will be ignored. The default is [0, 1e20]. It is common to make nNeighbors big and max small so that the hyper-sphere will define the neighborhood.
|
inline |
Specifies to use the neighborhoods determined by the specified neighbor-finder instead of the nearest Euclidean-distance neighbors. If this method is called, pNF should have the same number of neighbors and the same dataset as is passed into this class.
void GClasses::GManifoldSculpting::setPreprocessedData | ( | GMatrix * | pData | ) |
This will takes ownership of pData. (It will modify pData too.) Specifies reduced dimensionality data created by another algorithm, which should be refined using Manifold Sculpting.
|
inline |
Set the rate of squishing. (.99 is a good value)
double GClasses::GManifoldSculpting::squishPass | ( | size_t | nSeedDataPoint | ) |
Perform one iteration of squishing. Returns a heuristical error value.
|
inlineprotected |
|
inlineprotectedvirtual |
You can overload this to add some intelligent supervision to the heuristic.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |