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-2008 Soeren Sonnenburg 00008 * Written (W) 1999-2008 Gunnar Raetsch 00009 * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society 00010 */ 00011 00012 #ifndef __GUIPREPROC_H__ 00013 #define __GUIPREPROC_H__ 00014 00015 #include <shogun/lib/config.h> 00016 #include <shogun/lib/List.h> 00017 #include <shogun/base/SGObject.h> 00018 #include <shogun/preprocessor/Preprocessor.h> 00019 00020 namespace shogun 00021 { 00022 class CSGInterface; 00023 00025 class CGUIPreprocessor : public CSGObject 00026 { 00027 public: 00029 CGUIPreprocessor() { }; 00033 CGUIPreprocessor(CSGInterface* interface); 00035 ~CGUIPreprocessor(); 00036 00038 CPreprocessor* create_generic(EPreprocessorType type); 00040 CPreprocessor* create_prunevarsubmean(bool divide_by_std=false); 00042 CPreprocessor* create_pca(bool do_whitening, float64_t threshold); 00043 00045 bool add_preproc(CPreprocessor* preproc); 00047 bool del_preproc(); 00049 bool clean_preproc(); 00050 00055 bool attach_preproc(char* target, bool do_force=false); 00056 00058 virtual const char* get_name() const { return "GUIPreprocessor"; } 00059 00060 protected: 00066 bool preprocess_features(CFeatures* trainfeat, CFeatures* testfeat, bool force); 00071 bool preproc_all_features(CFeatures* f, bool force); 00072 00074 CList* preprocs; 00076 CSGInterface* ui; 00077 }; 00078 } 00079 #endif