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
CDimensionReductionPreprocessor Class Reference

Detailed Description

the class DimensionReductionPreprocessor, a base class for preprocessors used to lower the dimensionality of given simple features (dense matrices).

Definition at line 30 of file DimensionReductionPreprocessor.h.

Inheritance diagram for CDimensionReductionPreprocessor:
Inheritance graph
[legend]

Public Member Functions

 CDimensionReductionPreprocessor ()
 CDimensionReductionPreprocessor (CEmbeddingConverter *converter)
virtual ~CDimensionReductionPreprocessor ()
virtual bool init (CFeatures *data)
virtual void cleanup ()
virtual SGMatrix< float64_tapply_to_feature_matrix (CFeatures *features)
virtual SGVector< float64_tapply_to_feature_vector (SGVector< float64_t > vector)
virtual const char * get_name () const
virtual EPreprocessorType get_type () const
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)
virtual EFeatureType get_feature_type ()
 return feature type
- 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)

Protected Member Functions

void init ()

Protected Attributes

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 10 of file DimensionReductionPreprocessor.cpp.

convenience constructor converting any embeddingconverter into a dimensionreduction preprocessor

Parameters
converterembedding converter

Definition at line 21 of file DimensionReductionPreprocessor.cpp.

destructor

Definition at line 33 of file DimensionReductionPreprocessor.cpp.

Member Function Documentation

SGMatrix< float64_t > apply_to_feature_matrix ( CFeatures features)
virtual

apply preproc to feature matrix by default does nothing, returns given features' matrix

Implements CSimplePreprocessor< float64_t >.

Reimplemented in CPCA, and CKernelPCA.

Definition at line 40 of file DimensionReductionPreprocessor.cpp.

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

apply preproc to feature vector by default does nothing, returns given feature vector

Implements CSimplePreprocessor< float64_t >.

Reimplemented in CPCA, and CKernelPCA.

Definition at line 67 of file DimensionReductionPreprocessor.h.

void cleanup ( )
virtual

cleanup set empty by default, should be defined if dimension reduction preprocessor should free some resources

Implements CPreprocessor.

Reimplemented in CPCA, and CKernelPCA.

Definition at line 63 of file DimensionReductionPreprocessor.cpp.

CDistance * get_distance ( ) const

getter for distance

Returns
distance

Definition at line 88 of file DimensionReductionPreprocessor.cpp.

CKernel * get_kernel ( ) const

getter for kernel

Returns
kernel

Definition at line 101 of file DimensionReductionPreprocessor.cpp.

virtual const char* get_name ( ) const
virtual

get name

Implements CSGObject.

Reimplemented in CPCA, and CKernelPCA.

Definition at line 73 of file DimensionReductionPreprocessor.h.

int32_t get_target_dim ( ) const

getter for target dimension

Returns
target dimension

Definition at line 76 of file DimensionReductionPreprocessor.cpp.

EPreprocessorType get_type ( ) const
virtual

get type

Reimplemented from CSimplePreprocessor< float64_t >.

Reimplemented in CPCA, and CKernelPCA.

Definition at line 68 of file DimensionReductionPreprocessor.cpp.

bool init ( CFeatures data)
virtual

init set true by default, should be defined if dimension reduction preprocessor is using some initialization

Implements CPreprocessor.

Reimplemented in CPCA, and CKernelPCA.

Definition at line 58 of file DimensionReductionPreprocessor.cpp.

void init ( )
protected

default init

Reimplemented from CSGObject.

Reimplemented in CPCA, and CKernelPCA.

Definition at line 107 of file DimensionReductionPreprocessor.cpp.

void set_distance ( CDistance distance)

setter for distance

Parameters
distancedistance to set

Definition at line 81 of file DimensionReductionPreprocessor.cpp.

void set_kernel ( CKernel kernel)

setter for kernel

Parameters
kernelkernel to set

Definition at line 94 of file DimensionReductionPreprocessor.cpp.

void set_target_dim ( int32_t  dim)

setter for target dimension

Parameters
dimtarget dimension

Definition at line 70 of file DimensionReductionPreprocessor.cpp.

Member Data Documentation

CEmbeddingConverter* m_converter
protected

embedding converter to be used

Definition at line 125 of file DimensionReductionPreprocessor.h.

CDistance* m_distance
protected

distance to be used

Definition at line 119 of file DimensionReductionPreprocessor.h.

CKernel* m_kernel
protected

kernel to be used

Definition at line 122 of file DimensionReductionPreprocessor.h.

int32_t m_target_dim
protected

target dim of dimensionality reduction preprocessor

Definition at line 116 of file DimensionReductionPreprocessor.h.


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

SHOGUN Machine Learning Toolbox - Documentation