CLogPlusOne Class Reference

Inheritance diagram for CLogPlusOne:

Inheritance graph
[legend]

List of all members.


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 30 of file LogPlusOne.h.


Public Member Functions

 CLogPlusOne ()
virtual ~CLogPlusOne ()
virtual bool init (CFeatures *f)
 initialize preprocessor from features
virtual bool load_init_data (FILE *src)
 initialize preprocessor from file
virtual bool save_init_data (FILE *dst)
 save init-data (like transforamtion matrices etc) to file
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)

Constructor & Destructor Documentation

CLogPlusOne::CLogPlusOne (  ) 

default constructor

Definition at line 17 of file LogPlusOne.cpp.

CLogPlusOne::~CLogPlusOne (  )  [virtual]

Definition at line 23 of file LogPlusOne.cpp.


Member Function Documentation

bool CLogPlusOne::init ( CFeatures f  )  [virtual]

initialize preprocessor from features

Implements CPreProc.

Definition at line 28 of file LogPlusOne.cpp.

bool CLogPlusOne::load_init_data ( FILE *  src  )  [virtual]

initialize preprocessor from file

Implements CPreProc.

Definition at line 87 of file LogPlusOne.cpp.

bool CLogPlusOne::save_init_data ( FILE *  dst  )  [virtual]

save init-data (like transforamtion matrices etc) to file

Implements CPreProc.

Definition at line 93 of file LogPlusOne.cpp.

void CLogPlusOne::cleanup (  )  [virtual]

cleanup

clean up allocated memory

Implements CPreProc.

Definition at line 37 of file LogPlusOne.cpp.

bool CLogPlusOne::load ( FILE *  f  )  [virtual]

initialize preprocessor from file

Definition at line 42 of file LogPlusOne.cpp.

bool CLogPlusOne::save ( FILE *  f  )  [virtual]

save preprocessor init-data to file

Definition at line 48 of file LogPlusOne.cpp.

float64_t * CLogPlusOne::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();

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

Implements CSimplePreProc< ST >.

Definition at line 56 of file LogPlusOne.cpp.

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

apply preproc on single feature vector result in feature matrix

apply preproc on single feature vector result in feature matrix

Definition at line 75 of file LogPlusOne.cpp.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation