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.
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 GRT_BEGIN_NAMESPACE
36 
38 public:
43 
48 
58  virtual bool predict(const VectorFloat &x);
59 
66  virtual bool clear();
67 
74  virtual bool print() const;
75 
83  virtual bool getModel( std::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 VectorFloat &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, Float &minError );
137 
138  virtual bool computeBestSpiltBestRandomSpilt( const UINT &numSplittingSteps, const ClassificationData &trainingData, const Vector< UINT > &features, const Vector< UINT > &classLabels, UINT &featureIndex, Float &minError );
139 
140  bool computeBestSpilt( const UINT &numSplittingSteps, const ClassificationData &trainingData, const Vector< UINT > &features, const Vector< UINT > &classLabels, UINT &featureIndex, Float &minError );
141 
149  virtual bool saveParametersToFile( std::fstream &file ) const;
150 
157  virtual bool loadParametersFromFile( std::fstream &file );
158 
159  UINT featureIndexA;
160  UINT featureIndexB;
161  UINT featureIndexC;
162  static RegisterNode< DecisionTreeTripleFeatureNode > registerModule;
163 };
164 
165 GRT_END_NAMESPACE
166 
167 #endif //GRT_DECISION_TREE_TRIPLE_FEATURE_NODE_HEADER
168 
bool set(const UINT nodeSize, const UINT featureIndexA, const UINT featureIndexB, const UINT featureIndexC, const VectorFloat &classProbabilities)
Definition: Node.h:37
virtual bool saveParametersToFile(std::fstream &file) const
virtual bool predict(const VectorFloat &x)
virtual bool getModel(std::ostream &stream) const
This file implements a DecisionTreeNode, which is a specific base node used for a DecisionTree...
DecisionTreeTripleFeatureNode * deepCopy() const
virtual bool loadParametersFromFile(std::fstream &file)