GestureRecognitionToolkit  Version: 1.0 Revision: 04-03-15
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
MinDistModel.h
Go to the documentation of this file.
1 
29 #ifndef GRT_MINDISTMODEL_HEADER
30 #define GRT_MINDISTMODEL_HEADER
31 
32 #include "../../Util/GRTCommon.h"
33 #include "../../ClusteringModules/KMeans/KMeans.h"
34 
35 namespace GRT{
36 
38 {
39 public:
40 
44  MinDistModel();
45 
49  MinDistModel(const MinDistModel &rhs);
50 
54  ~MinDistModel(void);
55 
62  MinDistModel &operator=(const MinDistModel &rhs);
63 
64  bool train(UINT classLabel,MatrixDouble &trainingData,UINT numClusters,double minChange,UINT maxNumEpochs);
65  double predict(const VectorDouble &observation);
66  void recomputeThresholdValue();
67 
68  UINT getClassLabel() const;
69  UINT getNumFeatures() const;
70  UINT getNumClusters() const;
71  UINT getDistanceMode() const;
72  double getRejectionThreshold() const;
73  double getGamma() const;
74  double getTrainingMu() const;
75  double getTrainingSigma() const;
76  MatrixDouble getClusters() const;
77 
78  bool setClassLabel(UINT classLabel);
79  bool setClusters(MatrixDouble &clusters);
80  bool setGamma(double gamma);
81  bool setRejectionThreshold(double rejectionThreshold);
82  bool setTrainingSigma(double trainingSigma);
83  bool setTrainingMu(double trainingMu);
84 
85 private:
86  double SQR(double x){ return x*x; }
87  UINT classLabel;
88  UINT numFeatures;
89  UINT numClusters;
90  double rejectionThreshold; //The classification threshold value
91  double gamma; //The number of standard deviations to use for the threshold
92  double trainingMu; //The average confidence value in the training data
93  double trainingSigma; //The simga confidence value in the training data
94  MatrixDouble clusters;
95 };
96 
97 } //End of namespace GRT
98 
99 #endif //GRT_MINDISTMODEL_HEADER
100 
Definition: AdaBoost.cpp:25
MinDistModel & operator=(const MinDistModel &rhs)