GClasses
GClasses::GBreadthFirstUnfolding Class Reference

Detailed Description

A manifold learning algorithm that reduces dimensionality in local neighborhoods, and then stitches the reduced local neighborhoods together using the Kabsch algorithm.

#include <GManifold.h>

Inheritance diagram for GClasses::GBreadthFirstUnfolding:
GClasses::GTransform

Public Member Functions

 GBreadthFirstUnfolding (size_t reps, size_t neighborCount, size_t targetDims)
 reps specifies the number of times to compute the embedding, and blend the results together. If you just want fast results, use reps=1. More...
 
 GBreadthFirstUnfolding (GDomNode *pNode)
 
virtual ~GBreadthFirstUnfolding ()
 
GRandrand ()
 Returns a reference to the pseudo-random number generator used by this object. More...
 
virtual GMatrixreduce (const GMatrix &in)
 Perform NLDR. More...
 
GDomNodeserialize (GDom *pDoc) const
 Serialize this object. More...
 
void setNeighborFinder (GNeighborFinder *pNF)
 Specify the neighbor finder to use to pick neighbors for this algorithm. More...
 
void useMds (bool b)
 Specify to use multi-dimensional scaling instead of PCA to reduce in local patches. More...
 
- Public Member Functions inherited from GClasses::GTransform
 GTransform ()
 
 GTransform (const GDomNode *pNode)
 
virtual ~GTransform ()
 

Protected Member Functions

GMatrixreduceNeighborhood (const GMatrix *pIn, size_t index, GNeighborGraph *pNeighborGraph)
 
void refineNeighborhood (GMatrix *pLocal, size_t rootIndex, GNeighborGraph *pNeighborGraph)
 
GMatrixunfold (const GMatrix *pIn, GNeighborGraph *pNeighborGraph, size_t seed, double *pOutWeights)
 
- Protected Member Functions inherited from GClasses::GTransform
virtual GDomNodebaseDomNode (GDom *pDoc, const char *szClassName) const
 Child classes should use this in their implementation of serialize. More...
 

Static Protected Member Functions

static double refinePoint (double *pPoint, double *pNeighbor, size_t dims, double distance, double learningRate, GRand *pRand)
 Moves "pPoint" so that it is closer to a distance of "distance" from "pNeighbor". "learningRate" specifies how much to move it (0=not at all, 1=all the way). Returns the squared distance between pPoint and pNeighbor. More...
 

Protected Attributes

size_t m_neighborCount
 
GNeighborFinderm_pNF
 
GRand m_rand
 
size_t m_reps
 
size_t m_targetDims
 
bool m_useMds
 

Constructor & Destructor Documentation

GClasses::GBreadthFirstUnfolding::GBreadthFirstUnfolding ( size_t  reps,
size_t  neighborCount,
size_t  targetDims 
)

reps specifies the number of times to compute the embedding, and blend the results together. If you just want fast results, use reps=1.

GClasses::GBreadthFirstUnfolding::GBreadthFirstUnfolding ( GDomNode pNode)
virtual GClasses::GBreadthFirstUnfolding::~GBreadthFirstUnfolding ( )
virtual

Member Function Documentation

GRand& GClasses::GBreadthFirstUnfolding::rand ( )
inline

Returns a reference to the pseudo-random number generator used by this object.

virtual GMatrix* GClasses::GBreadthFirstUnfolding::reduce ( const GMatrix in)
virtual

Perform NLDR.

Implements GClasses::GTransform.

GMatrix* GClasses::GBreadthFirstUnfolding::reduceNeighborhood ( const GMatrix pIn,
size_t  index,
GNeighborGraph pNeighborGraph 
)
protected
void GClasses::GBreadthFirstUnfolding::refineNeighborhood ( GMatrix pLocal,
size_t  rootIndex,
GNeighborGraph pNeighborGraph 
)
protected
static double GClasses::GBreadthFirstUnfolding::refinePoint ( double *  pPoint,
double *  pNeighbor,
size_t  dims,
double  distance,
double  learningRate,
GRand pRand 
)
staticprotected

Moves "pPoint" so that it is closer to a distance of "distance" from "pNeighbor". "learningRate" specifies how much to move it (0=not at all, 1=all the way). Returns the squared distance between pPoint and pNeighbor.

GDomNode* GClasses::GBreadthFirstUnfolding::serialize ( GDom pDoc) const

Serialize this object.

void GClasses::GBreadthFirstUnfolding::setNeighborFinder ( GNeighborFinder pNF)

Specify the neighbor finder to use to pick neighbors for this algorithm.

GMatrix* GClasses::GBreadthFirstUnfolding::unfold ( const GMatrix pIn,
GNeighborGraph pNeighborGraph,
size_t  seed,
double *  pOutWeights 
)
protected
void GClasses::GBreadthFirstUnfolding::useMds ( bool  b)
inline

Specify to use multi-dimensional scaling instead of PCA to reduce in local patches.

Member Data Documentation

size_t GClasses::GBreadthFirstUnfolding::m_neighborCount
protected
GNeighborFinder* GClasses::GBreadthFirstUnfolding::m_pNF
protected
GRand GClasses::GBreadthFirstUnfolding::m_rand
protected
size_t GClasses::GBreadthFirstUnfolding::m_reps
protected
size_t GClasses::GBreadthFirstUnfolding::m_targetDims
protected
bool GClasses::GBreadthFirstUnfolding::m_useMds
protected