the class LaplacianEigenmaps used to preprocess data using Laplacian Eigenmaps algorithm as described in:
Belkin, M., & Niyogi, P. (2002). Laplacian Eigenmaps and Spectral Techniques for Embedding and Clustering. Science, 14, 585-591. MIT Press. Retrieved from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.19.9400&rep=rep1&type=pdf
Note that the algorithm is very sensitive to the heat distribution coefficient and number of neighbors in the nearest neighbor graph. No connectivity check is provided, so the preprocessor will not produce reasonable embeddings if the k value makes a graph that is not connected.
This implementation is not parallel due to performance issues. Generalized eigenproblem is the bottleneck for this algorithm.
Solving of generalized eigenproblem involves LAPACK DSYGVX routine and requires extra memory for right-hand side matrix storage. If ARPACK is available then DSAUPD/DSEUPD is used with no extra memory usage.
Definition at line 47 of file LaplacianEigenmaps.h.
Public Member Functions | |
CLaplacianEigenmaps () | |
virtual | ~CLaplacianEigenmaps () |
virtual CFeatures * | apply (CFeatures *features) |
virtual CSimpleFeatures < float64_t > * | embed_distance (CDistance *distance, CFeatures *features=NULL) |
void | set_k (int32_t k) |
int32_t | get_k () const |
void | set_tau (float64_t tau) |
float64_t | get_tau () const |
virtual const char * | get_name () const |
Protected Member Functions | |
void | init () |
virtual CSimpleFeatures < float64_t > * | construct_embedding (CFeatures *features, SGMatrix< float64_t > W_matrix) |
Protected Attributes | |
int32_t | m_k |
float64_t | m_tau |
constructor
Definition at line 24 of file LaplacianEigenmaps.cpp.
~CLaplacianEigenmaps | ( | ) | [virtual] |
destructor
Definition at line 39 of file LaplacianEigenmaps.cpp.
apply to features
features | to embed | |
embedding | features |
Implements CEmbeddingConverter.
Definition at line 69 of file LaplacianEigenmaps.cpp.
CSimpleFeatures< float64_t > * construct_embedding | ( | CFeatures * | features, | |
SGMatrix< float64_t > | W_matrix | |||
) | [protected, virtual] |
construct embedding
features | features | |
W_matrix | W matrix to be used |
Reimplemented in CLocalityPreservingProjections.
Definition at line 160 of file LaplacianEigenmaps.cpp.
CSimpleFeatures< float64_t > * embed_distance | ( | CDistance * | distance, | |
CFeatures * | features = NULL | |||
) | [virtual] |
embed distance
distance | to use for embedding | |
embedding | features |
Definition at line 88 of file LaplacianEigenmaps.cpp.
int32_t get_k | ( | ) | const |
const char * get_name | ( | ) | const [virtual] |
get name
Reimplemented from CEmbeddingConverter.
Reimplemented in CLocalityPreservingProjections.
Definition at line 64 of file LaplacianEigenmaps.cpp.
float64_t get_tau | ( | ) | const |
void init | ( | ) | [protected] |
void set_k | ( | int32_t | k | ) |
void set_tau | ( | float64_t | tau | ) |
setter for TAU parameter
tau | tau value |
Definition at line 54 of file LaplacianEigenmaps.cpp.
int32_t m_k [protected] |
number of neighbors
Definition at line 107 of file LaplacianEigenmaps.h.
tau parameter of heat distribution
Definition at line 110 of file LaplacianEigenmaps.h.