GestureRecognitionToolkit  Version: 0.1.0
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 
39 #ifndef GRT_MULTIDIMENSIONAL_REGRESSION_HEADER
40 #define GRT_MULTIDIMENSIONAL_REGRESSION_HEADER
41 
42 #include "../../CoreModules/Regressifier.h"
43 #include "../LinearRegression/LinearRegression.h"
44 
45 GRT_BEGIN_NAMESPACE
46 
48 {
49 public:
55  MultidimensionalRegression(const Regressifier &regressifier = LinearRegression(),bool useScaling=false);
56 
60  virtual ~MultidimensionalRegression(void);
61 
69 
77  virtual bool deepCopyFrom(const Regressifier *regressifier);
78 
86  virtual bool train_(RegressionData &trainingData);
87 
95  virtual bool predict_(VectorFloat &inputVector);
96 
104  virtual bool saveModelToFile( std::fstream &file ) const;
105 
113  virtual bool loadModelFromFile( std::fstream &file );
114 
123  bool getIsRegressionModuleSet() const;
124 
131  Regressifier *getRegressifier() const;
132 
139  bool setRegressionModule( const Regressifier &regressifier );
140 
141  //Tell the compiler we are using the base class train method to stop hidden virtual function warnings
144 
145 protected:
146  bool deepCopyRegressionModules( Vector< Regressifier* > &newModules ) const;
147  bool deleteAll();
148  bool deleteRegressionModules();
149  bool loadLegacyModelFromFile( std::fstream &file );
150 
151  Regressifier *regressifier;
152  Vector< Regressifier* > regressionModules;
154 };
155 
156 GRT_END_NAMESPACE
157 
158 #endif //GRT_MULTIDIMENSIONAL_REGRESSION_HEADER
159 
virtual bool predict_(VectorFloat &inputVector)
virtual bool train_(RegressionData &trainingData)
MultidimensionalRegression(const Regressifier &regressifier=LinearRegression(), bool useScaling=false)
bool loadLegacyModelFromFile(std::fstream &file)
MultidimensionalRegression & operator=(const MultidimensionalRegression &rhs)
virtual bool saveModelToFile(std::string filename) const
Definition: MLBase.cpp:146
virtual bool loadModelFromFile(std::fstream &file)
virtual bool saveModelToFile(std::fstream &file) const
virtual bool loadModelFromFile(std::string filename)
Definition: MLBase.cpp:168
bool setRegressionModule(const Regressifier &regressifier)
virtual bool deepCopyFrom(const Regressifier *regressifier)