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.
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 
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 
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 bool train(ClassificationData &trainingData, VectorFloat &weights)
virtual Float predict(const VectorFloat &x)
virtual bool loadModelFromFile(std::fstream &file)
virtual bool deepCopyFrom(const WeakClassifier *weakClassifer)
RadialBasisFunction & operator=(const RadialBasisFunction &rhs)
virtual void print() const
Float getMinAlphaSearchRange() const
This is the main base class for all GRT WeakClassifiers.
static RegisterWeakClassifierModule< RadialBasisFunction > registerModule
This is used to register the DecisionStump with the WeakClassifier base class.
virtual bool saveModelToFile(std::fstream &file) const
VectorFloat getRBFCentre() const
Float getMaxAlphaSearchRange() const
RadialBasisFunction(UINT numSteps=100, Float positiveClassificationThreshold=0.9, Float minAlphaSearchRange=0.001, Float maxAlphaSearchRange=1.0)
Float getPositiveClassificationThreshold() const