|
SHOGUN
v1.1.0
|
LocalTangentSpaceAlignment used to embed data using Local Tangent Space Alignment (LTSA) algorithm as described in:
Zhang, Z., & Zha, H. (2002). Principal Manifolds and Nonlinear Dimension Reduction via Local Tangent Space Alignment. Journal of Shanghai University English Edition, 8(4), 406-424. SIAM. Retrieved from http://arxiv.org/abs/cs/0212008
Due to performance reasons on high-dimensional datasets please use KernelLocalTangentSpaceAlignment with linear kernel.
The stated eigenproblem is solved in the same way as CLocallyLinearEmbedding (LAPACK or ARPACK if available).
The local tangent space alignment step is parallel. Neighborhood determination is parallel as in CLocallyLinearEmbedding.
This algorithm is pretty stable for variations of k parameter value but be sure it is set with a consistent value (at least 3-5) for reasonable results.
Please do not use multithreading whether your LAPACK is not thread-safe.
Definition at line 50 of file LocalTangentSpaceAlignment.h.

Public Member Functions | |
| CLocalTangentSpaceAlignment () | |
| virtual | ~CLocalTangentSpaceAlignment () |
| virtual const char * | get_name () const |
Public Member Functions inherited from CLocallyLinearEmbedding | |
| CLocallyLinearEmbedding () | |
| virtual | ~CLocallyLinearEmbedding () |
| virtual CFeatures * | apply (CFeatures *features) |
| void | set_k (int32_t k) |
| int32_t | get_k () const |
| void | set_max_k (int32_t max_k) |
| int32_t | get_max_k () const |
| void | set_auto_k (bool auto_k) |
| bool | get_auto_k () const |
| void | set_reconstruction_shift (float64_t reconstruction_shift) |
| float64_t | get_reconstruction_shift () const |
| void | set_nullspace_shift (float64_t nullspace_shift) |
| float64_t | get_nullspace_shift () const |
| void | set_use_arpack (bool use_arpack) |
| bool | get_use_arpack () const |
Public Member Functions inherited from CEmbeddingConverter | |
| CEmbeddingConverter () | |
| virtual | ~CEmbeddingConverter () |
| virtual CSimpleFeatures < float64_t > * | embed (CFeatures *features) |
| void | set_target_dim (int32_t dim) |
| int32_t | get_target_dim () const |
| void | set_distance (CDistance *distance) |
| CDistance * | get_distance () const |
| void | set_kernel (CKernel *kernel) |
| CKernel * | get_kernel () const |
Public Member Functions inherited from CConverter | |
| CConverter () | |
| virtual | ~CConverter () |
Public Member Functions inherited from CSGObject | |
| CSGObject () | |
| CSGObject (const CSGObject &orig) | |
| virtual | ~CSGObject () |
| virtual bool | is_generic (EPrimitiveType *generic) const |
| template<class T > | |
| void | set_generic () |
| void | unset_generic () |
| virtual void | print_serializable (const char *prefix="") |
| virtual bool | save_serializable (CSerializableFile *file, const char *prefix="") |
| virtual bool | load_serializable (CSerializableFile *file, const char *prefix="") |
| void | set_global_io (SGIO *io) |
| SGIO * | get_global_io () |
| void | set_global_parallel (Parallel *parallel) |
| Parallel * | get_global_parallel () |
| void | set_global_version (Version *version) |
| Version * | get_global_version () |
| SGVector< char * > | get_modelsel_names () |
| char * | get_modsel_param_descr (const char *param_name) |
| index_t | get_modsel_param_index (const char *param_name) |
Protected Member Functions | |
| virtual SGMatrix< float64_t > | construct_weight_matrix (CSimpleFeatures< float64_t > *simple_features, float64_t *W_matrix, SGMatrix< int32_t > neighborhood_matrix) |
| HELPER. | |
Protected Member Functions inherited from CLocallyLinearEmbedding | |
| void | init () |
| HELPERS. | |
| virtual SGMatrix< float64_t > | construct_embedding (SGMatrix< float64_t > matrix, int dimension) |
| virtual SGMatrix< int32_t > | get_neighborhood_matrix (SGMatrix< float64_t > distance_matrix, int32_t k) |
| int32_t | estimate_k (CSimpleFeatures< float64_t > *simple_features, SGMatrix< int32_t > neighborhood_matrix) |
| float64_t | compute_reconstruction_error (int32_t k, int dim, int N, float64_t *feature_matrix, float64_t *z_matrix, float64_t *covariance_matrix, float64_t *resid_vector, float64_t *id_vector, SGMatrix< int32_t > neighborhood_matrix) |
Static Protected Member Functions | |
| static void * | run_ltsa_thread (void *p) |
| THREAD. | |
Static Protected Member Functions inherited from CLocallyLinearEmbedding | |
| static void * | run_neighborhood_thread (void *p) |
| THREADS. | |
| static void * | run_linearreconstruction_thread (void *p) |
Additional Inherited Members | |
Public Attributes inherited from CSGObject | |
| SGIO * | io |
| Parallel * | parallel |
| Version * | version |
| Parameter * | m_parameters |
| Parameter * | m_model_selection_parameters |
Protected Attributes inherited from CLocallyLinearEmbedding | |
| int32_t | m_k |
| FIELDS. | |
| int32_t | m_max_k |
| float64_t | m_reconstruction_shift |
| float64_t | m_nullspace_shift |
| bool | m_use_arpack |
| bool | m_auto_k |
constructor
Definition at line 67 of file LocalTangentSpaceAlignment.cpp.
|
virtual |
destructor
Definition at line 72 of file LocalTangentSpaceAlignment.cpp.
|
protectedvirtual |
HELPER.
construct weight matrix
| simple_features | features to be used |
| W_matrix | weight matrix |
| neighborhood_matrix | matrix containing neighbor idxs |
Reimplemented from CLocallyLinearEmbedding.
Definition at line 81 of file LocalTangentSpaceAlignment.cpp.
|
virtual |
get name
Reimplemented from CLocallyLinearEmbedding.
Reimplemented in CLinearLocalTangentSpaceAlignment.
Definition at line 76 of file LocalTangentSpaceAlignment.cpp.
|
staticprotected |
THREAD.
run ltsa thread
| p | thread params |
Definition at line 175 of file LocalTangentSpaceAlignment.cpp.