SHOGUN
v2.0.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 }; 00053 00068 class CPreprocessor : public CSGObject 00069 { 00070 public: 00072 CPreprocessor() : CSGObject() 00073 { 00074 }; 00075 00077 virtual ~CPreprocessor() 00078 { 00079 } 00080 00082 virtual bool init(CFeatures* features)=0; 00083 00085 virtual void cleanup()=0; 00086 00088 virtual EFeatureType get_feature_type()=0; 00089 00091 virtual EFeatureClass get_feature_class()=0; 00092 00094 virtual EPreprocessorType get_type() const=0; 00095 }; 00096 } 00097 #endif // PREPROCESSOR_H_