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.
DecisionTreeTripleFeatureNode.h
Go to the documentation of this file.
1 
29 #ifndef GRT_DECISION_TREE_TRIPLE_FEATURE_NODE_HEADER
30 #define GRT_DECISION_TREE_TRIPLE_FEATURE_NODE_HEADER
31 
32 #include "DecisionTreeNode.h"
33 #include "../../ClusteringModules/KMeans/KMeans.h"
34 
35 namespace GRT{
36 
38 public:
43 
48 
58  virtual bool predict(const VectorDouble &x);
59 
66  virtual bool clear();
67 
74  virtual bool print() const;
75 
83  virtual bool getModel(ostream &stream) const;
84 
91  virtual Node* deepCopyNode() const;
92 
100 
106  UINT getFeatureIndexA() const;
107 
113  UINT getFeatureIndexB() const;
114 
120  UINT getFeatureIndexC() const;
121 
132  bool set(const UINT nodeSize,const UINT featureIndexA,const UINT featureIndexB,const UINT featureIndexC,const VectorDouble &classProbabilities);
133 
134 protected:
135 
136  virtual bool computeBestSpiltBestIterativeSpilt( const UINT &numSplittingSteps, const ClassificationData &trainingData, const vector< UINT > &features, const vector< UINT > &classLabels, UINT &featureIndex, double &minError );
137 
138  virtual bool computeBestSpiltBestRandomSpilt( const UINT &numSplittingSteps, const ClassificationData &trainingData, const vector< UINT > &features, const vector< UINT > &classLabels, UINT &featureIndex, double &minError );
139 
140  bool computeBestSpilt( const UINT &numSplittingSteps, const ClassificationData &trainingData, const vector< UINT > &features, const vector< UINT > &classLabels, UINT &featureIndex, double &minError );
141 
149  virtual bool saveParametersToFile(fstream &file) const;
150 
157  virtual bool loadParametersFromFile(fstream &file);
158 
159  UINT featureIndexA;
160  UINT featureIndexB;
161  UINT featureIndexC;
162  static RegisterNode< DecisionTreeTripleFeatureNode > registerModule;
163 };
164 
165 } //End of namespace GRT
166 
167 #endif //GRT_DECISION_TREE_TRIPLE_FEATURE_NODE_HEADER
168 
Definition: AdaBoost.cpp:25
DecisionTreeTripleFeatureNode * deepCopy() const
This file implements a DecisionTreeNode, which is a specific base node used for a DecisionTree...
virtual bool getModel(ostream &stream) const
virtual bool saveParametersToFile(fstream &file) const
bool set(const UINT nodeSize, const UINT featureIndexA, const UINT featureIndexB, const UINT featureIndexC, const VectorDouble &classProbabilities)
Definition: Node.h:37
virtual bool predict(const VectorDouble &x)