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

List of all members.

Public Member Functions

 CPruneVarSubMean (bool divide=true)
virtual ~CPruneVarSubMean ()
virtual bool init (CFeatures *f)
 initialize preprocessor from features
virtual void cleanup ()
virtual float64_tapply_to_feature_matrix (CFeatures *f)
virtual float64_tapply_to_feature_vector (float64_t *f, int32_t &len)
virtual const char * get_name ()

Protected Attributes

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

Constructor & Destructor Documentation

CPruneVarSubMean ( bool  divide = true  ) 


divide if division shall be made

Definition at line 21 of file PruneVarSubMean.cpp.

~CPruneVarSubMean (  )  [virtual]

Definition at line 27 of file PruneVarSubMean.cpp.

Member Function Documentation

float64_t * apply_to_feature_matrix ( CFeatures f  )  [virtual]

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

Implements CSimplePreProc< float64_t >.

Definition at line 142 of file PruneVarSubMean.cpp.

float64_t * apply_to_feature_vector ( float64_t f,
int32_t &  len 
) [virtual]

apply preproc on single feature vector result in feature matrix

Implements CSimplePreProc< float64_t >.

Definition at line 178 of file PruneVarSubMean.cpp.

void cleanup (  )  [virtual]


clean up allocated memory

Implements CPreProc.

Definition at line 129 of file PruneVarSubMean.cpp.

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

Implements CSGObject.

Definition at line 56 of file PruneVarSubMean.h.

bool init ( CFeatures f  )  [virtual]

initialize preprocessor from features

Implements CPreProc.

Definition at line 33 of file PruneVarSubMean.cpp.

Member Data Documentation

bool divide_by_std [protected]

divide by std

Definition at line 68 of file PruneVarSubMean.h.

int32_t* idx [protected]


Definition at line 60 of file PruneVarSubMean.h.

bool initialized [protected]

true when already initialized

Definition at line 71 of file PruneVarSubMean.h.

float64_t* mean [protected]


Definition at line 62 of file PruneVarSubMean.h.

int32_t num_idx [protected]

num idx

Definition at line 66 of file PruneVarSubMean.h.

float64_t* std [protected]


Definition at line 64 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