SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
RescaleFeatures.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) 20013 Viktor Gal
00008  * Copyright (C) 2013 Viktor Gal
00009  */
00010 
00011 #ifndef __RESCALEFEATURES_H__
00012 #define __RESCALEFEATURES_H__
00013 
00014 #include <shogun/preprocessor/DensePreprocessor.h>
00015 
00016 namespace shogun
00017 {
00028     class CRescaleFeatures : public CDensePreprocessor<float64_t>
00029     {
00030         public:
00032             CRescaleFeatures();
00033 
00035             virtual ~CRescaleFeatures();
00036 
00042             virtual bool init(CFeatures* features);
00043 
00047             virtual void cleanup();
00048 
00055             virtual SGMatrix<float64_t> apply_to_feature_matrix(CFeatures* features);
00056 
00060             virtual SGVector<float64_t> apply_to_feature_vector(SGVector<float64_t> vector);
00061 
00063             virtual const char* get_name() const { return "RescaleFeatures"; }
00064 
00066             virtual EPreprocessorType get_type() const { return P_RESCALEFEATURES; }
00067 
00068         private:
00069             void register_parameters();
00070 
00071         protected:
00073             SGVector<float64_t> m_min;
00075             SGVector<float64_t> m_range;
00077             bool m_initialized;
00078         };
00079 }
00080 
00081 #endif /* __RESCALEFEATURES_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation