Public Member Functions

CNormOne Class Reference

Detailed Description

Preprocessor NormOne, normalizes vectors to have norm 1.

Formally, it computes

\[ {\bf x} \leftarrow \frac{{\bf x}}{||{\bf x}||} \]

It therefore does not need any initialization. It is most useful to get data onto a ball of radius one.

Definition at line 33 of file NormOne.h.

Inheritance diagram for CNormOne:
Inheritance graph

List of all members.

Public Member Functions

 CNormOne ()
virtual ~CNormOne ()
virtual bool init (CFeatures *f)
 initialize preprocessor from features
virtual void cleanup ()
virtual bool load (FILE *f)
 initialize preprocessor from file
virtual bool save (FILE *f)
 save preprocessor init-data to file
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 ()

Constructor & Destructor Documentation

CNormOne (  ) 

default constructor

Definition at line 19 of file NormOne.cpp.

~CNormOne (  )  [virtual]

Definition at line 24 of file NormOne.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 61 of file NormOne.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 78 of file NormOne.cpp.

void cleanup (  )  [virtual]


clean up allocated memory

Implements CPreProc.

Definition at line 38 of file NormOne.cpp.

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

Implements CSGObject.

Definition at line 59 of file NormOne.h.

bool init ( CFeatures f  )  [virtual]

initialize preprocessor from features

Implements CPreProc.

Definition at line 29 of file NormOne.cpp.

bool load ( FILE *  f  )  [virtual]

initialize preprocessor from file

Definition at line 43 of file NormOne.cpp.

bool save ( FILE *  f  )  [virtual]

save preprocessor init-data to file

Definition at line 51 of file NormOne.cpp.

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