|
SHOGUN
v1.1.0
|
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.

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_t > | apply_to_feature_matrix (CFeatures *features) |
| virtual SGVector< float64_t > | apply_to_feature_vector (SGVector< float64_t > vector) |
| virtual const char * | get_name () const |
| virtual EPreprocessorType | get_type () const |
| return a type of preprocessor | |
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) |
| SGIO * | get_global_io () |
| void | set_global_parallel (Parallel *parallel) |
| Parallel * | get_global_parallel () |
| void | set_global_version (Version *version) |
| Version * | get_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 Attributes | |
| int32_t * | idx |
| float64_t * | mean |
| float64_t * | std |
| int32_t | num_idx |
| bool | divide_by_std |
| bool | initialized |
| true when already initialized | |
Additional Inherited Members | |
Public Attributes inherited from CSGObject | |
| SGIO * | io |
| Parallel * | parallel |
| Version * | version |
| Parameter * | m_parameters |
| Parameter * | m_model_selection_parameters |
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) |
| CPruneVarSubMean | ( | bool | divide = true | ) |
constructor
| divide | if division shall be made |
Definition at line 21 of file PruneVarSubMean.cpp.
|
virtual |
destructor
Definition at line 27 of file PruneVarSubMean.cpp.
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.
apply preproc on single feature vector result in feature matrix
Implements CSimplePreprocessor< float64_t >.
Definition at line 170 of file PruneVarSubMean.cpp.
|
virtual |
cleanup
clean up allocated memory
Implements CPreprocessor.
Definition at line 121 of file PruneVarSubMean.cpp.
|
virtual |
|
virtual |
return a type of preprocessor
Reimplemented from CSimplePreprocessor< float64_t >.
Definition at line 61 of file PruneVarSubMean.h.
|
virtual |
initialize preprocessor from features
Implements CPreprocessor.
Definition at line 33 of file PruneVarSubMean.cpp.
|
protected |
divide by std
Definition at line 73 of file PruneVarSubMean.h.
|
protected |
idx
Definition at line 65 of file PruneVarSubMean.h.
|
protected |
true when already initialized
Definition at line 76 of file PruneVarSubMean.h.
|
protected |
mean
Definition at line 67 of file PruneVarSubMean.h.
|
protected |
num idx
Definition at line 71 of file PruneVarSubMean.h.
|
protected |
std
Definition at line 69 of file PruneVarSubMean.h.