GClasses
GClasses::GSaffron Class Reference

This class implementes the SAFFRON intelligent neighbor-finding algorithm published in Gashler, Michael S. and Martinez, Tony. Tangent space guided intelligent neighbor finding. In Proceedings of the IEEE International Joint Conference on Neural Networks IJCNN’11, pages 2617–2624, IEEE Press, 2011. This class intelligently selects neighbors for each point in a dataset, such that the neighbors define a good neighborhood for manifold learning. A relaxation technique is used to ensure that neighbors lie on a consistent tangent-space while remaining close to the point. This makes manifold learning possible with difficult (somtimes even self-intersecting) manifolds. More...

#include <GNeighborFinder.h>

Inheritance diagram for GClasses::GSaffron:
GClasses::GNeighborFinder

Public Member Functions

 GSaffron (GMatrix *pData, size_t medianCands, size_t neighbors, size_t tangentDims, double sqCorrCap, GRand *pRand)
 General-purpose constructor. More...
 
virtual ~GSaffron ()
 
double meanNeighborCount (double *pDeviation)
 Returns the mean number of neighbors for each point. If pDeviation is non-NULL, it is set to the deviation. More...
 
virtual void neighbors (size_t *pOutNeighbors, size_t index)
 See the comment for GNeighborFinder::neighbors. More...
 
virtual void neighbors (size_t *pOutNeighbors, double *pOutDistances, size_t index)
 See the comment for GNeighborFinder::neighbors. More...
 
- Public Member Functions inherited from GClasses::GNeighborFinder
 GNeighborFinder (const GMatrix *pData, size_t neighborCount)
 
virtual ~GNeighborFinder ()
 
virtual bool canGeneralize ()
 Returns true if this neighbor finder can operate on points that are not in the dataset passed to the constructor. More...
 
const GMatrixdata ()
 Returns the data passed to the constructor of this object. More...
 
virtual bool isCached ()
 Returns true iff the neighbors and distances are pre-computed. More...
 
size_t neighborCount ()
 Returns the number of neighbors to find. More...
 
void sortNeighbors (size_t *pNeighbors, double *pDistances)
 Uses Quick Sort to sort the neighbors from least to most dissimilar, followed by any slots for with INVALID_INDEX for the index. (Note: This method is pointless, since the neighors are already guaranteed to come in sorted order. Todo: figure out why it is still here) More...
 

Static Protected Member Functions

static double measureAlignment (double *pA, GMatrix *pATan, double *pB, GMatrix *pBTan, double cap, double squaredRadius, GRand *pRand)
 

Protected Attributes

double m_learningRate
 
double m_minImprovement
 
double * m_pDistances
 
size_t * m_pNeighborhoods
 
bool m_prune
 
size_t m_rows
 
int m_windowSize
 
- Protected Attributes inherited from GClasses::GNeighborFinder
size_t m_neighborCount
 
const GMatrixm_pData
 

Additional Inherited Members

- Static Public Member Functions inherited from GClasses::GNeighborFinder
static void sortNeighbors (size_t neighborCount, size_t *pNeighbors, double *pDistances)
 Uses Quick Sort to sort the neighbors from least to most dissimilar, followed by any slots for with INVALID_INDEX for the index. (Note: This method is pointless, since the neighors are already guaranteed to come in sorted order. Todo: figure out why it is still here) More...
 

Detailed Description

This class implementes the SAFFRON intelligent neighbor-finding algorithm published in Gashler, Michael S. and Martinez, Tony. Tangent space guided intelligent neighbor finding. In Proceedings of the IEEE International Joint Conference on Neural Networks IJCNN’11, pages 2617–2624, IEEE Press, 2011. This class intelligently selects neighbors for each point in a dataset, such that the neighbors define a good neighborhood for manifold learning. A relaxation technique is used to ensure that neighbors lie on a consistent tangent-space while remaining close to the point. This makes manifold learning possible with difficult (somtimes even self-intersecting) manifolds.

Constructor & Destructor Documentation

GClasses::GSaffron::GSaffron ( GMatrix pData,
size_t  medianCands,
size_t  neighbors,
size_t  tangentDims,
double  sqCorrCap,
GRand pRand 
)

General-purpose constructor.

virtual GClasses::GSaffron::~GSaffron ( )
virtual

Member Function Documentation

double GClasses::GSaffron::meanNeighborCount ( double *  pDeviation)

Returns the mean number of neighbors for each point. If pDeviation is non-NULL, it is set to the deviation.

static double GClasses::GSaffron::measureAlignment ( double *  pA,
GMatrix pATan,
double *  pB,
GMatrix pBTan,
double  cap,
double  squaredRadius,
GRand pRand 
)
staticprotected
virtual void GClasses::GSaffron::neighbors ( size_t *  pOutNeighbors,
size_t  index 
)
virtual

See the comment for GNeighborFinder::neighbors.

Implements GClasses::GNeighborFinder.

virtual void GClasses::GSaffron::neighbors ( size_t *  pOutNeighbors,
double *  pOutDistances,
size_t  index 
)
virtual

See the comment for GNeighborFinder::neighbors.

Implements GClasses::GNeighborFinder.

Member Data Documentation

double GClasses::GSaffron::m_learningRate
protected
double GClasses::GSaffron::m_minImprovement
protected
double* GClasses::GSaffron::m_pDistances
protected
size_t* GClasses::GSaffron::m_pNeighborhoods
protected
bool GClasses::GSaffron::m_prune
protected
size_t GClasses::GSaffron::m_rows
protected
int GClasses::GSaffron::m_windowSize
protected