LogPlusOne.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2009 Soeren Sonnenburg
00008  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _CLOGPLUSONE__H__
00012 #define _CLOGPLUSONE__H__
00013 
00014 #include <shogun/preprocessor/SimplePreprocessor.h>
00015 #include <shogun/features/Features.h>
00016 #include <shogun/lib/common.h>
00017 
00018 #include <stdio.h>
00019 
00020 namespace shogun
00021 {
00033 class CLogPlusOne : public CSimplePreprocessor<float64_t>
00034 {
00035     public:
00037         CLogPlusOne();
00038 
00040         virtual ~CLogPlusOne();
00041 
00043         virtual bool init(CFeatures* features);
00044 
00046         virtual void cleanup();
00048         virtual bool load(FILE* f);
00050         virtual bool save(FILE* f);
00051 
00055         virtual SGMatrix<float64_t> apply_to_feature_matrix(CFeatures* features);
00056 
00059         virtual SGVector<float64_t> apply_to_feature_vector(SGVector<float64_t> vector);
00060 
00062         virtual inline const char* get_name() const { return "LogPlusOne"; }
00063 
00065         virtual inline EPreprocessorType get_type() const { return P_LOGPLUSONE; }
00066 };
00067 }
00068 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation