GClasses
GClasses::GManifold Class Reference

Detailed Description

This class stores static methods that are useful for manifold learning.

#include <GManifold.h>

Static Public Member Functions

static GMatrixblendEmbeddings (GMatrix *pA, double *pRatios, GMatrix *pB, size_t neighborCount, GNeighborGraph *pNeighborTable, size_t seed)
 Combines two embeddings to form an "average" embedding. pRatios is an array that specifies how much to weight the neighborhoods around each point. If the ratio for a point is close to zero, pA will be emphasized more. If the ratio for the point is close to 1, pB will be emphasized more. "seed" specifies a starting point. It will blend outward in a breadth-first manner. More...
 
static GMatrixblendNeighborhoods (size_t index, GMatrix *pA, double ratio, GMatrix *pB, size_t neighborCount, GNeighborFinder *pNF)
 Aligns and averages two local neighborhoods together. The results will be centered around the neighborhood mean. The first point will be the index point, and the rest will be neighborhood points with an index that is not INVALID_INDEX. More...
 
static void computeNeighborWeights (const GMatrix *pData, size_t point, size_t k, const size_t *pNeighbors, double *pOutWeights)
 Computes a set of weights for each neighbor to linearly approximate this point. More...
 
static GMatrixmultiDimensionalScaling (GMatrix *pDistances, size_t targetDims, GRand *pRand, bool useSquaredDistances)
 Performs classic MDS. pDistances must be a square matrix, but only the upper-triangle is used. Each row in the results is one of the result points. If useSquaredDistances is true, then the values in pDistances are assumed to be squared distances, rather than normal Euclidean distances. More...
 
static void test ()
 

Member Function Documentation

static GMatrix* GClasses::GManifold::blendEmbeddings ( GMatrix pA,
double *  pRatios,
GMatrix pB,
size_t  neighborCount,
GNeighborGraph pNeighborTable,
size_t  seed 
)
static

Combines two embeddings to form an "average" embedding. pRatios is an array that specifies how much to weight the neighborhoods around each point. If the ratio for a point is close to zero, pA will be emphasized more. If the ratio for the point is close to 1, pB will be emphasized more. "seed" specifies a starting point. It will blend outward in a breadth-first manner.

static GMatrix* GClasses::GManifold::blendNeighborhoods ( size_t  index,
GMatrix pA,
double  ratio,
GMatrix pB,
size_t  neighborCount,
GNeighborFinder pNF 
)
static

Aligns and averages two local neighborhoods together. The results will be centered around the neighborhood mean. The first point will be the index point, and the rest will be neighborhood points with an index that is not INVALID_INDEX.

static void GClasses::GManifold::computeNeighborWeights ( const GMatrix pData,
size_t  point,
size_t  k,
const size_t *  pNeighbors,
double *  pOutWeights 
)
static

Computes a set of weights for each neighbor to linearly approximate this point.

static GMatrix* GClasses::GManifold::multiDimensionalScaling ( GMatrix pDistances,
size_t  targetDims,
GRand pRand,
bool  useSquaredDistances 
)
static

Performs classic MDS. pDistances must be a square matrix, but only the upper-triangle is used. Each row in the results is one of the result points. If useSquaredDistances is true, then the values in pDistances are assumed to be squared distances, rather than normal Euclidean distances.

static void GClasses::GManifold::test ( )
static