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.
RadialBasisFunction.h
Go to the documentation of this file.
1 
33 #ifndef GRT_RADIAL_BASIC_FUNCTION_HEADER
34 #define GRT_RADIAL_BASIC_FUNCTION_HEADER
35 
36 #include "WeakClassifier.h"
37 
38 GRT_BEGIN_NAMESPACE
39 
40 class GRT_API RadialBasisFunction : public WeakClassifier{
41 public:
54  RadialBasisFunction(UINT numSteps=100,Float positiveClassificationThreshold=0.9,Float minAlphaSearchRange=0.001,Float maxAlphaSearchRange=1.0);
55 
59  virtual ~RadialBasisFunction();
60 
65 
70 
77  virtual bool deepCopyFrom(const WeakClassifier *weakClassifer);
78 
86  virtual bool train(ClassificationData &trainingData, VectorFloat &weights);
87 
95  virtual Float predict(const VectorFloat &x);
96 
103  virtual bool saveModelToFile( std::fstream &file ) const;
104 
111  virtual bool loadModelFromFile( std::fstream &file );
112 
116  virtual void print() const;
117 
123  UINT getNumSteps() const;
124 
132  Float getPositiveClassificationThreshold() const;
133 
139  Float getAlpha() const;
140 
146  Float getMinAlphaSearchRange() const;
147 
153  Float getMaxAlphaSearchRange() const;
154 
160  VectorFloat getRBFCentre() const;
161 
162 protected:
163  Float rbf(const VectorFloat &a,const VectorFloat &b);
164 
165  UINT numSteps;
166  Float positiveClassificationThreshold;
167  Float alpha;
168  Float gamma;
169  Float minAlphaSearchRange;
170  Float maxAlphaSearchRange;
171  VectorFloat rbfCentre;
172 
174 };
175 
176 GRT_END_NAMESPACE
177 
178 #endif // GRT_DECISION_STUMP_HEADER
virtual Float predict(const VectorFloat &x)
virtual bool deepCopyFrom(const WeakClassifier *weakClassifer)
virtual bool saveModelToFile(std::fstream &file) const
virtual bool train(ClassificationData &trainingData, VectorFloat &weights)
This is the main base class for all GRT WeakClassifiers.
virtual bool loadModelFromFile(std::fstream &file)
static RegisterWeakClassifierModule< RadialBasisFunction > registerModule
This is used to register the DecisionStump with the WeakClassifier base class.
WeakClassifier & operator=(const WeakClassifier &rhs)
virtual void print() const