Public Member Functions

CLogPlusOne Class Reference


Detailed Description

Preprocessor LogPlusOne does what the name says, it adds one to a dense real valued vector and takes the logarithm of each component of it.

\[ {\bf x}\leftarrow \log({\bf x}+{\bf 1}) \]

It therefore does not need any initialization. It is most useful in situations where the inputs are counts: When one compares differences of small counts any difference may matter a lot, while small differences in large counts don't. This is what this log transformation controls for.

Definition at line 33 of file LogPlusOne.h.

Inheritance diagram for CLogPlusOne:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CLogPlusOne ()
virtual ~CLogPlusOne ()
virtual bool init (CFeatures *f)
 initialize preprocessor from features
virtual void cleanup ()
 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

CLogPlusOne (  ) 

default constructor

Definition at line 19 of file LogPlusOne.cpp.

~CLogPlusOne (  )  [virtual]

Definition at line 25 of file LogPlusOne.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 62 of file LogPlusOne.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 81 of file LogPlusOne.cpp.

void cleanup (  )  [virtual]

cleanup

clean up allocated memory

Implements CPreProc.

Definition at line 39 of file LogPlusOne.cpp.

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

Reimplemented from CPreProc.

Definition at line 60 of file LogPlusOne.h.

bool init ( CFeatures f  )  [virtual]

initialize preprocessor from features

Implements CPreProc.

Definition at line 30 of file LogPlusOne.cpp.

bool load ( FILE *  f  )  [virtual]

initialize preprocessor from file

Definition at line 44 of file LogPlusOne.cpp.

bool save ( FILE *  f  )  [virtual]

save preprocessor init-data to file

Definition at line 52 of file LogPlusOne.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