SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
CIsomap Class Reference

Detailed Description

the class Isomap used to preprocess data using K-Isomap algorithm as described in

Silva, V. D., & Tenenbaum, J. B. (2003). Global versus local methods in nonlinear dimensionality reduction. Advances in Neural Information Processing Systems 15, 15(Figure 2), 721-728. MIT Press. Retrieved from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.3407&rep=rep1&type=pdf

Shortest paths are being computed with Dijkstra's algorithm with heap in parallel. Due to sparsity of the kNN graph Fibonacci Heap with amortized O(1) Extract-Min operation time complexity is used.

It is possible to apply preprocessor to specified distance using apply_to_distance.

Definition at line 45 of file Isomap.h.

Inheritance diagram for CIsomap:
Inheritance graph
[legend]

Public Member Functions

 CIsomap ()
 
virtual ~CIsomap ()
 
const char * get_name () const
 
void set_k (int32_t k)
 
int32_t get_k () const
 
- Public Member Functions inherited from CMultidimensionalScaling
 CMultidimensionalScaling ()
 
virtual ~CMultidimensionalScaling ()
 
virtual CSimpleFeatures
< float64_t > * 
embed_distance (CDistance *distance)
 
virtual CFeaturesapply (CFeatures *features)
 
const char * get_name () const
 
SGVector< float64_tget_eigenvalues () const
 
void set_landmark_number (int32_t num)
 
int32_t get_landmark_number () const
 
void set_landmark (bool landmark)
 
bool get_landmark () 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)
 
CDistanceget_distance () const
 
void set_kernel (CKernel *kernel)
 
CKernelget_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)
 
SGIOget_global_io ()
 
void set_global_parallel (Parallel *parallel)
 
Parallelget_global_parallel ()
 
void set_global_version (Version *version)
 
Versionget_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)
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 
template<>
void set_generic ()
 

Protected Member Functions

virtual void init ()
 HELPERS. More...
 
virtual SGMatrix< float64_tprocess_distance_matrix (SGMatrix< float64_t > distance_matrix)
 
SGMatrix< float64_tisomap_distance (SGMatrix< float64_t > D_matrix)
 
- Protected Member Functions inherited from CMultidimensionalScaling
SGMatrix< float64_tclassic_embedding (SGMatrix< float64_t > distance_matrix)
 
SGMatrix< float64_tlandmark_embedding (SGMatrix< float64_t > distance_matrix)
 
- Protected Member Functions inherited from CEmbeddingConverter
void init ()
 
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
 
virtual void load_serializable_post () throw (ShogunException)
 
virtual void save_serializable_pre () throw (ShogunException)
 
virtual void save_serializable_post () throw (ShogunException)
 

Static Protected Member Functions

static void * run_dijkstra_thread (void *p)
 THREADS. More...
 
- Static Protected Member Functions inherited from CMultidimensionalScaling
static void * run_triangulation_thread (void *p)
 STATIC. More...
 
static SGVector< int32_t > shuffle (int32_t count, int32_t total_count)
 

Protected Attributes

int32_t m_k
 FIELDS. More...
 
- Protected Attributes inherited from CMultidimensionalScaling
SGVector< float64_tm_eigenvalues
 FIELDS. More...
 
bool m_landmark
 
int32_t m_landmark_number
 
- Protected Attributes inherited from CEmbeddingConverter
int32_t m_target_dim
 
CDistancem_distance
 
CKernelm_kernel
 

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
 
Parallelparallel
 
Versionversion
 
Parameterm_parameters
 
Parameterm_model_selection_parameters
 

Constructor & Destructor Documentation

CIsomap ( )

Definition at line 56 of file Isomap.cpp.

~CIsomap ( )
virtual

Definition at line 68 of file Isomap.cpp.

Member Function Documentation

int32_t get_k ( ) const

getter for k parameter

Returns
k value

Definition at line 78 of file Isomap.cpp.

const char * get_name ( ) const
virtual

get name

Reimplemented from CEmbeddingConverter.

Definition at line 83 of file Isomap.cpp.

void init ( )
protectedvirtual

HELPERS.

default init

Reimplemented from CMultidimensionalScaling.

Definition at line 63 of file Isomap.cpp.

SGMatrix< float64_t > isomap_distance ( SGMatrix< float64_t D_matrix)
protected

approximate geodesic distance with shortest path in kNN graph

Parameters
D_matrixdistance matrix (deleted on exit)
Returns
approximate geodesic distance matrix

Definition at line 93 of file Isomap.cpp.

SGMatrix< float64_t > process_distance_matrix ( SGMatrix< float64_t distance_matrix)
protectedvirtual

process distance matrix (redefined in isomap, for mds does nothing)

Parameters
distance_matrixdistance matrix
Returns
processed distance matrix

Reimplemented from CMultidimensionalScaling.

Definition at line 88 of file Isomap.cpp.

void * run_dijkstra_thread ( void *  p)
staticprotected

THREADS.

run dijkstra thread

Parameters
pthread params

Definition at line 211 of file Isomap.cpp.

void set_k ( int32_t  k)

setter for k parameter

Parameters
kvalue

Definition at line 72 of file Isomap.cpp.

Member Data Documentation

int32_t m_k
protected

FIELDS.

k, number of neighbors for K-Isomap

Definition at line 85 of file Isomap.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation