GestureRecognitionToolkit  Version: 0.2.5
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
MultidimensionalRegression.h
Go to the documentation of this file.
1 
26 #ifndef GRT_MULTIDIMENSIONAL_REGRESSION_HEADER
27 #define GRT_MULTIDIMENSIONAL_REGRESSION_HEADER
28 
29 #include "../../CoreModules/Regressifier.h"
30 #include "../LinearRegression/LinearRegression.h"
31 
32 GRT_BEGIN_NAMESPACE
33 
48 {
49 public:
55  MultidimensionalRegression(const Regressifier &regressifier = LinearRegression(),bool useScaling=false);
56 
63 
67  virtual ~MultidimensionalRegression(void);
68 
76 
84  virtual bool deepCopyFrom(const Regressifier *regressifier);
85 
93  virtual bool train_(RegressionData &trainingData);
94 
102  virtual bool predict_(VectorFloat &inputVector);
103 
111  virtual bool save( std::fstream &file ) const;
112 
120  virtual bool load( std::fstream &file );
121 
130  bool getIsRegressionModuleSet() const;
131 
138  Regressifier *getRegressifier() const;
139 
146  bool setRegressionModule( const Regressifier &regressifier );
147 
153  static std::string getId();
154 
155  //Tell the compiler we are using the base class train method to stop hidden virtual function warnings
156  using MLBase::save;
157  using MLBase::load;
158 
159 protected:
160  bool deepCopyRegressionModules( Vector< Regressifier* > &newModules ) const;
161  bool deleteAll();
162  bool deleteRegressionModules();
163  bool loadLegacyModelFromFile( std::fstream &file );
164 
165  Regressifier *regressifier;
166  Vector< Regressifier* > regressionModules;
167 
168 private:
170  static const std::string id;
171 };
172 
173 GRT_END_NAMESPACE
174 
175 #endif //GRT_MULTIDIMENSIONAL_REGRESSION_HEADER
176 
std::string getId() const
Definition: GRTBase.cpp:85
virtual bool predict_(VectorFloat &inputVector)
Definition: MLBase.cpp:137
virtual bool save(const std::string &filename) const
Definition: MLBase.cpp:167
virtual bool deepCopyFrom(const Regressifier *regressifier)
Definition: Regressifier.h:64
virtual bool train_(ClassificationData &trainingData)
Definition: MLBase.cpp:109
virtual bool load(const std::string &filename)
Definition: MLBase.cpp:190