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.
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 namespace GRT{
41 
43 public:
48 
53 
64  virtual bool predict(const VectorDouble &x);
65 
72  virtual bool clear();
73 
80  virtual bool print() const;
81 
89  virtual bool getModel(ostream &stream) const;
90 
97  virtual Node* deepCopyNode() const;
98 
106 
112  UINT getFeatureIndex() const;
118  double getThreshold() const;
119 
129  bool set(const UINT nodeSize,const UINT featureIndex,const double threshold,const VectorDouble &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, double &minError );
134 
135  virtual bool computeBestSpiltBestRandomSpilt( const UINT &numSplittingSteps, const ClassificationData &trainingData, const vector< UINT > &features, const vector< UINT > &classLabels, UINT &featureIndex, double &minError );
136 
144  virtual bool saveParametersToFile(fstream &file) const;
145 
152  virtual bool loadParametersFromFile(fstream &file);
153 
154  UINT featureIndex;
155  double threshold;
156 
157  static RegisterNode< DecisionTreeThresholdNode > registerModule;
158 };
159 
160 } //End of namespace GRT
161 
162 #endif //GRT_DECISION_TREE_THRESHOLD_NODE_HEADER
163 
virtual bool predict(const VectorDouble &x)
virtual bool getModel(ostream &stream) const
DecisionTreeThresholdNode * deepCopy() const
Definition: AdaBoost.cpp:25
virtual bool saveParametersToFile(fstream &file) const
This file implements a DecisionTreeNode, which is a specific base node used for a DecisionTree...
bool set(const UINT nodeSize, const UINT featureIndex, const double threshold, const VectorDouble &classProbabilities)
Definition: Node.h:37
virtual bool loadParametersFromFile(fstream &file)