Public Member Functions | Protected Attributes

CPruneVarSubMean Class Reference


Detailed Description

Preprocessor PruneVarSubMean will substract the mean and remove features that have zero variance.

It will optionally normalize standard deviation of features to 1 (by dividing by standard deviation of the feature)

Definition at line 30 of file PruneVarSubMean.h.

Inheritance diagram for CPruneVarSubMean:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CPruneVarSubMean (bool divide=true)
virtual ~CPruneVarSubMean ()
virtual bool init (CFeatures *features)
 initialize preprocessor from features
virtual void cleanup ()
 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
 return a type of preprocessor

Protected Attributes

int32_t * idx
float64_tmean
float64_tstd
int32_t num_idx
bool divide_by_std
bool initialized
 true when already initialized

Constructor & Destructor Documentation

CPruneVarSubMean ( bool  divide = true  ) 

constructor

Parameters:
divide if division shall be made

Definition at line 21 of file PruneVarSubMean.cpp.

~CPruneVarSubMean (  )  [virtual]

destructor

Definition at line 27 of file PruneVarSubMean.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();

Implements CSimplePreprocessor< float64_t >.

Definition at line 134 of file PruneVarSubMean.cpp.

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

apply preproc on single feature vector result in feature matrix

Implements CSimplePreprocessor< float64_t >.

Definition at line 170 of file PruneVarSubMean.cpp.

void cleanup (  )  [virtual]

cleanup

clean up allocated memory

Implements CPreprocessor.

Definition at line 121 of file PruneVarSubMean.cpp.

virtual const char* get_name ( void   )  const [virtual]
Returns:
object name

Implements CSGObject.

Definition at line 58 of file PruneVarSubMean.h.

virtual EPreprocessorType get_type (  )  const [virtual]

return a type of preprocessor

Reimplemented from CSimplePreprocessor< float64_t >.

Definition at line 61 of file PruneVarSubMean.h.

bool init ( CFeatures features  )  [virtual]

initialize preprocessor from features

Implements CPreprocessor.

Definition at line 33 of file PruneVarSubMean.cpp.


Member Data Documentation

bool divide_by_std [protected]

divide by std

Definition at line 73 of file PruneVarSubMean.h.

int32_t* idx [protected]

idx

Definition at line 65 of file PruneVarSubMean.h.

bool initialized [protected]

true when already initialized

Definition at line 76 of file PruneVarSubMean.h.

float64_t* mean [protected]

mean

Definition at line 67 of file PruneVarSubMean.h.

int32_t num_idx [protected]

num idx

Definition at line 71 of file PruneVarSubMean.h.

float64_t* std [protected]

std

Definition at line 69 of file PruneVarSubMean.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation