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 48 of file LaplacianEigenmaps.h.
Public Member Functions | |
CLaplacianEigenmaps () | |
virtual | ~CLaplacianEigenmaps () |
virtual bool | init (CFeatures *features) |
virtual void | cleanup () |
virtual SGMatrix< float64_t > | apply_to_feature_matrix (CFeatures *features) |
virtual SGVector< float64_t > | apply_to_feature_vector (SGVector< float64_t > vector) |
void | set_k (int32_t k) |
int32_t | get_k () |
void | set_tau (float64_t tau) |
float64_t | get_tau () |
virtual const char * | get_name () const |
virtual EPreprocessorType | get_type () const |
Protected Member Functions | |
void | init () |
Protected Attributes | |
int32_t | m_k |
float64_t | m_tau |
constructor
Definition at line 25 of file LaplacianEigenmaps.cpp.
~CLaplacianEigenmaps | ( | ) | [virtual] |
destructor
Definition at line 40 of file LaplacianEigenmaps.cpp.
apply preprocessor to feature matrix
features |
Reimplemented from CDimensionReductionPreprocessor.
Definition at line 53 of file LaplacianEigenmaps.cpp.
apply preproc to feature vector
vector |
Reimplemented from CDimensionReductionPreprocessor.
Definition at line 193 of file LaplacianEigenmaps.cpp.
void cleanup | ( | ) | [virtual] |
cleanup
Reimplemented from CDimensionReductionPreprocessor.
Definition at line 49 of file LaplacianEigenmaps.cpp.
int32_t get_k | ( | ) |
virtual const char* get_name | ( | void | ) | const [virtual] |
get name
Reimplemented from CDimensionReductionPreprocessor.
Definition at line 111 of file LaplacianEigenmaps.h.
float64_t get_tau | ( | ) |
virtual EPreprocessorType get_type | ( | ) | const [virtual] |
get type
Reimplemented from CDimensionReductionPreprocessor.
Definition at line 114 of file LaplacianEigenmaps.h.
bool init | ( | CFeatures * | features | ) | [virtual] |
init
features |
Reimplemented from CDimensionReductionPreprocessor.
Definition at line 44 of file LaplacianEigenmaps.cpp.
void init | ( | void | ) | [protected] |
init
Reimplemented from CDimensionReductionPreprocessor.
Definition at line 31 of file LaplacianEigenmaps.cpp.
void set_k | ( | int32_t | k | ) |
void set_tau | ( | float64_t | tau | ) |
setter for TAU parameter
tau | tau value |
Definition at line 97 of file LaplacianEigenmaps.h.
int32_t m_k [protected] |
number of neighbors
Definition at line 124 of file LaplacianEigenmaps.h.
tau parameter of heat distribution
Definition at line 127 of file LaplacianEigenmaps.h.