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.
LogisticRegression.h
Go to the documentation of this file.
1 
33 #ifndef GRT_LOGISTIC_REGRESSION_HEADER
34 #define GRT_LOGISTIC_REGRESSION_HEADER
35 
36 #include "../../CoreModules/Regressifier.h"
37 
38 GRT_BEGIN_NAMESPACE
39 
41 {
42 public:
48  LogisticRegression(const bool useScaling=true);
49 
53  virtual ~LogisticRegression(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(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  inline Float sigmoid(const Float x) const;
130  bool loadLegacyModelFromFile( std::fstream &file );
131 
132  Float w0;
135 };
136 
137 GRT_END_NAMESPACE
138 
139 #endif //GRT_LOGISTIC_REGRESSION_HEADER
140 
UINT getMaxNumIterations() const
LogisticRegression(const bool useScaling=true)
virtual bool predict_(VectorFloat &inputVector)
LogisticRegression & operator=(const LogisticRegression &rhs)
virtual bool train_(RegressionData &trainingData)
virtual ~LogisticRegression(void)
virtual bool saveModelToFile(std::string filename) const
Definition: MLBase.cpp:146
bool loadLegacyModelFromFile(std::fstream &file)
virtual bool loadModelFromFile(std::string filename)
Definition: MLBase.cpp:168
VectorFloat w
The weights vector.
bool setMaxNumIterations(UINT maxNumIterations)
virtual bool deepCopyFrom(const Regressifier *regressifier)
virtual bool loadModelFromFile(std::fstream &file)
virtual bool saveModelToFile(std::fstream &file) const