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 | Protected Attributes
CKernelPCA Class Reference

Detailed Description

Preprocessor KernelPCA performs kernel principal component analysis.

Schoelkopf, B., Smola, A. J., & Mueller, K. R. (1999). Kernel Principal Component Analysis. Advances in kernel methods support vector learning, 1327(3), 327-352. MIT Press. Retrieved from http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.32.8744

Definition at line 35 of file KernelPCA.h.

Inheritance diagram for CKernelPCA:
Inheritance graph
[legend]

Public Member Functions

 CKernelPCA ()
 
 CKernelPCA (CKernel *k)
 
virtual ~CKernelPCA ()
 
virtual bool init (CFeatures *features)
 initialize preprocessor from features More...
 
virtual void cleanup ()
 cleanup More...
 
virtual SGMatrix< float64_tapply_to_feature_matrix (CFeatures *features)
 
virtual SGVector< float64_tapply_to_feature_vector (SGVector< float64_t > vector)
 
virtual CSimpleFeatures
< float64_t > * 
apply_to_string_features (CFeatures *features)
 
SGMatrix< float64_tget_transformation_matrix () const
 
SGVector< float64_tget_bias_vector () const
 
virtual const char * get_name () const
 
virtual EPreprocessorType get_type () const
 
- Public Member Functions inherited from CDimensionReductionPreprocessor
 CDimensionReductionPreprocessor ()
 
 CDimensionReductionPreprocessor (CEmbeddingConverter *converter)
 
virtual ~CDimensionReductionPreprocessor ()
 
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 CSimplePreprocessor< float64_t >
 CSimplePreprocessor ()
 
virtual EFeatureClass get_feature_class ()
 return that we are simple features (just fixed size matrices) More...
 
virtual EFeatureType get_feature_type ()
 return feature type More...
 
- Public Member Functions inherited from CPreprocessor
 CPreprocessor ()
 
virtual ~CPreprocessor ()
 
- 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

void init ()
 
- Protected Member Functions inherited from CDimensionReductionPreprocessor
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)
 

Protected Attributes

CFeaturesm_init_features
 
SGMatrix< float64_tm_transformation_matrix
 
SGVector< float64_tm_bias_vector
 
bool m_initialized
 
- Protected Attributes inherited from CDimensionReductionPreprocessor
int32_t m_target_dim
 
CDistancem_distance
 
CKernelm_kernel
 
CEmbeddingConverterm_converter
 

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
 
Parallelparallel
 
Versionversion
 
Parameterm_parameters
 
Parameterm_model_selection_parameters
 

Constructor & Destructor Documentation

default constructor

Definition at line 29 of file KernelPCA.cpp.

CKernelPCA ( CKernel k)

constructor

Parameters
kkernel to be used

Definition at line 34 of file KernelPCA.cpp.

~CKernelPCA ( )
virtual

Definition at line 61 of file KernelPCA.cpp.

Member Function Documentation

SGMatrix< float64_t > apply_to_feature_matrix ( CFeatures features)
virtual

apply preproc on feature matrix result in feature matrix return pointer to feature_matrix, i.e. f->get_feature_matrix();

Reimplemented from CDimensionReductionPreprocessor.

Definition at line 129 of file KernelPCA.cpp.

SGVector< float64_t > apply_to_feature_vector ( SGVector< float64_t vector)
virtual

apply preproc on single feature vector result in feature matrix

Reimplemented from CDimensionReductionPreprocessor.

Definition at line 161 of file KernelPCA.cpp.

CSimpleFeatures< float64_t > * apply_to_string_features ( CFeatures features)
virtual

apply to string features

Parameters
features

Definition at line 186 of file KernelPCA.cpp.

void cleanup ( )
virtual

cleanup

Reimplemented from CDimensionReductionPreprocessor.

Definition at line 53 of file KernelPCA.cpp.

SGVector<float64_t> get_bias_vector ( ) const

get bias of KPCA

Definition at line 79 of file KernelPCA.h.

virtual const char* get_name ( ) const
virtual
Returns
object name

Reimplemented from CDimensionReductionPreprocessor.

Definition at line 85 of file KernelPCA.h.

SGMatrix<float64_t> get_transformation_matrix ( ) const

get transformation matrix, i.e. eigenvectors

Definition at line 71 of file KernelPCA.h.

virtual EPreprocessorType get_type ( ) const
virtual
Returns
the type of preprocessor

Reimplemented from CDimensionReductionPreprocessor.

Definition at line 88 of file KernelPCA.h.

bool init ( CFeatures features)
virtual

initialize preprocessor from features

Reimplemented from CDimensionReductionPreprocessor.

Definition at line 68 of file KernelPCA.cpp.

void init ( )
protected

default init

Definition at line 40 of file KernelPCA.cpp.

Member Data Documentation

SGVector<float64_t> m_bias_vector
protected

bias vector

Definition at line 104 of file KernelPCA.h.

CFeatures* m_init_features
protected

features used by init. needed for apply

Definition at line 98 of file KernelPCA.h.

bool m_initialized
protected

true when already initialized

Definition at line 107 of file KernelPCA.h.

SGMatrix<float64_t> m_transformation_matrix
protected

transformation matrix

Definition at line 101 of file KernelPCA.h.


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

SHOGUN Machine Learning Toolbox - Documentation