GestureRecognitionToolkit  Version: 0.2.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
DecisionTreeThresholdNode.h
Go to the documentation of this file.
1 
35 #ifndef GRT_DECISION_TREE_THRESHOLD_NODE_HEADER
36 #define GRT_DECISION_TREE_THRESHOLD_NODE_HEADER
37 
38 #include "DecisionTreeNode.h"
39 
40 GRT_BEGIN_NAMESPACE
41 
43 public:
48 
52  virtual ~DecisionTreeThresholdNode();
53 
64  virtual bool predict(const VectorFloat &x);
65 
72  virtual bool clear();
73 
80  virtual bool print() const;
81 
89  virtual bool getModel( std::ostream &stream ) const;
90 
97  virtual Node* deepCopyNode() const;
98 
106 
112  UINT getFeatureIndex() const;
118  Float getThreshold() const;
119 
129  bool set(const UINT nodeSize,const UINT featureIndex,const Float threshold,const VectorFloat &classProbabilities);
130 
131 protected:
132 
133  virtual bool computeBestSpiltBestIterativeSpilt( const UINT &numSplittingSteps, const ClassificationData &trainingData, const Vector< UINT > &features, const Vector< UINT > &classLabels, UINT &featureIndex, Float &minError );
134 
135  virtual bool computeBestSpiltBestRandomSpilt( 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;
145 
152  virtual bool loadParametersFromFile( std::fstream &file );
153 
154  UINT featureIndex;
155  Float threshold;
156 
157  static RegisterNode< DecisionTreeThresholdNode > registerModule;
158 };
159 
160 GRT_END_NAMESPACE
161 
162 #endif //GRT_DECISION_TREE_THRESHOLD_NODE_HEADER
163 
virtual bool clear()
Definition: Node.h:37
virtual bool print() const
Definition: Node.cpp:109
This file implements a DecisionTreeNode, which is a specific base node used for a DecisionTree...
virtual bool saveParametersToFile(std::fstream &file) const
virtual bool predict(const VectorFloat &x, VectorFloat &classLikelihoods)
DecisionTreeNode * deepCopy() const
virtual Node * deepCopyNode() const
virtual bool loadParametersFromFile(std::fstream &file)
virtual bool getModel(std::ostream &stream) const