SHOGUN
v3.2.0
|
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 * Written (W) 1999-2008 Gunnar Raetsch 00009 * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society 00010 */ 00011 00012 #ifndef PREPROCESSOR_H_ 00013 #define PREPROCESSOR_H_ 00014 00015 #include <shogun/lib/common.h> 00016 #include <shogun/base/SGObject.h> 00017 #include <shogun/features/FeatureTypes.h> 00018 #include <shogun/features/Features.h> 00019 00020 namespace shogun 00021 { 00022 00023 class CFeatures; 00024 00030 enum EPreprocessorType 00031 { 00032 P_UNKNOWN=0, 00033 P_NORMONE=10, 00034 P_LOGPLUSONE=20, 00035 P_SORTWORDSTRING=30, 00036 P_SORTULONGSTRING=40, 00037 P_SORTWORD=50, 00038 P_PRUNEVARSUBMEAN=60, 00039 P_DECOMPRESSSTRING=70, 00040 P_DECOMPRESSCHARSTRING=80, 00041 P_DECOMPRESSBYTESTRING=90, 00042 P_DECOMPRESSWORDSTRING=100, 00043 P_DECOMPRESSULONGSTRING=110, 00044 P_RANDOMFOURIERGAUSS=120, 00045 P_PCA=130, 00046 P_KERNELPCA=140, 00047 P_NORMDERIVATIVELEM3=150, 00048 P_DIMENSIONREDUCTIONPREPROCESSOR=160, 00049 P_SUMONE=170, 00050 P_HOMOGENEOUSKERNELMAP = 180, 00051 P_PNORM = 190, 00052 P_RESCALEFEATURES = 200 00053 }; 00054 00069 class CPreprocessor : public CSGObject 00070 { 00071 public: 00073 CPreprocessor() : CSGObject() 00074 { 00075 }; 00076 00078 virtual ~CPreprocessor() 00079 { 00080 } 00081 00083 virtual bool init(CFeatures* features)=0; 00084 00086 virtual void cleanup()=0; 00087 00089 virtual EFeatureType get_feature_type()=0; 00090 00092 virtual EFeatureClass get_feature_class()=0; 00093 00095 virtual EPreprocessorType get_type() const=0; 00096 }; 00097 } 00098 #endif // PREPROCESSOR_H_