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.
DecisionTreeTripleFeatureNode.h
Go to the documentation of this file.
1 
27 #ifndef GRT_DECISION_TREE_TRIPLE_FEATURE_NODE_HEADER
28 #define GRT_DECISION_TREE_TRIPLE_FEATURE_NODE_HEADER
29 
30 #include "DecisionTreeNode.h"
31 #include "../../ClusteringModules/KMeans/KMeans.h"
32 
33 GRT_BEGIN_NAMESPACE
34 
39 public:
44 
49 
59  virtual bool predict_(VectorFloat &x) override;
60 
67  virtual bool clear() override;
68 
75  virtual bool print() const override;
76 
84  virtual bool getModel( std::ostream &stream ) const override;
85 
92  virtual Node* deepCopy() const override;
93 
99  UINT getFeatureIndexA() const;
100 
106  UINT getFeatureIndexB() const;
107 
113  UINT getFeatureIndexC() const;
114 
125  bool set(const UINT nodeSize,const UINT featureIndexA,const UINT featureIndexB,const UINT featureIndexC,const VectorFloat &classProbabilities);
126 
128 
129 protected:
130 
131  virtual bool computeBestSplitBestIterativeSplit( const UINT &numSplittingSteps, const ClassificationData &trainingData, const Vector< UINT > &features, const Vector< UINT > &classLabels, UINT &featureIndex, Float &minError ) override;
132 
133  virtual bool computeBestSplitBestRandomSplit( const UINT &numSplittingSteps, const ClassificationData &trainingData, const Vector< UINT > &features, const Vector< UINT > &classLabels, UINT &featureIndex, Float &minError ) override;
134 
135  bool computeSplit( const UINT &numSplittingSteps, const ClassificationData &trainingData, const Vector< UINT > &features, const Vector< UINT > &classLabels, UINT &featureIndex, Float &minError );
136 
144  virtual bool saveParametersToFile( std::fstream &file ) const override;
145 
152  virtual bool loadParametersFromFile( std::fstream &file ) override;
153 
154  UINT featureIndexA;
155  UINT featureIndexB;
156  UINT featureIndexC;
157  static RegisterNode< DecisionTreeTripleFeatureNode > registerModule;
158 };
159 
160 GRT_END_NAMESPACE
161 
162 #endif //GRT_DECISION_TREE_TRIPLE_FEATURE_NODE_HEADER
163 
virtual bool clear() override
Definition: Node.h:37
virtual bool predict_(VectorFloat &x, VectorFloat &classLikelihoods) override
virtual bool loadParametersFromFile(std::fstream &file) override
virtual Node * deepCopy() const override
virtual bool saveParametersToFile(std::fstream &file) const override
virtual bool getModel(std::ostream &stream) const override
This class implements a DecisionTreeTripleFeatureNode, which is a specific type of node used for a De...
virtual bool print() const override
Definition: Node.cpp:105