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.
LinearRegression.h
Go to the documentation of this file.
1 
33 #ifndef GRT_LINEAR_REGRESSION_HEADER
34 #define GRT_LINEAR_REGRESSION_HEADER
35 
36 #include "../../CoreModules/Regressifier.h"
37 
38 GRT_BEGIN_NAMESPACE
39 
41 {
42 public:
48  LinearRegression(bool useScaling=false);
49 
53  virtual ~LinearRegression(void);
54 
62 
70  virtual bool deepCopyFrom(const Regressifier *regressifier);
71 
79  virtual bool train_(RegressionData &trainingData);
80 
88  virtual bool predict_(VectorFloat &inputVector);
89 
97  virtual bool saveModelToFile( std::fstream &file ) const;
98 
106  virtual bool loadModelFromFile( std::fstream &file );
107 
113  UINT getMaxNumIterations() const;
114 
122  bool setMaxNumIterations(const UINT maxNumIterations);
123 
124  //Tell the compiler we are using the base class train method to stop hidden virtual function warnings
127 
128 protected:
129  bool loadLegacyModelFromFile( std::fstream &file );
130 
131  Float w0;
132  VectorFloat w;
134 };
135 
136 GRT_END_NAMESPACE
137 
138 #endif //GRT_LINEAR_REGRESSION_HEADER
139 
virtual bool saveModelToFile(std::fstream &file) const
virtual bool predict_(VectorFloat &inputVector)
LinearRegression(bool useScaling=false)
virtual ~LinearRegression(void)
virtual bool saveModelToFile(std::string filename) const
Definition: MLBase.cpp:146
LinearRegression & operator=(const LinearRegression &rhs)
bool setMaxNumIterations(const UINT maxNumIterations)
virtual bool loadModelFromFile(std::string filename)
Definition: MLBase.cpp:168
virtual bool train_(RegressionData &trainingData)
virtual bool deepCopyFrom(const Regressifier *regressifier)
bool loadLegacyModelFromFile(std::fstream &file)
UINT getMaxNumIterations() const
virtual bool loadModelFromFile(std::fstream &file)