35 #ifndef GRT_DECISION_TREE_HEADER
36 #define GRT_DECISION_TREE_HEADER
38 #include "../../CoreModules/Classifier.h"
39 #include "../../CoreAlgorithms/Tree/Tree.h"
61 DecisionTree(
const DecisionTreeNode &decisionTreeNode =
DecisionTreeClusterNode(),
const UINT minNumSamplesPerNode=5,
const UINT maxDepth=10,
const bool removeFeaturesAtEachSpilt =
false,
const UINT trainingMode = BEST_ITERATIVE_SPILT,
const UINT numSplittingSteps=100,
const bool useScaling=
false );
116 virtual bool clear();
133 virtual bool save( std::fstream &file )
const;
142 virtual bool load( std::fstream &file );
151 virtual bool getModel( std::ostream &stream )
const;
188 static std::string getId();
198 bool loadLegacyModelFromFile_v1( std::fstream &file );
199 bool loadLegacyModelFromFile_v2( std::fstream &file );
200 bool loadLegacyModelFromFile_v3( std::fstream &file );
203 Float getNodeDistance(
const VectorFloat &x,
const UINT nodeID );
207 std::map< UINT, VectorFloat > nodeClusters;
211 static std::string id;
216 #endif //GRT_DECISION_TREE_HEADER
virtual bool recomputeNullRejectionThresholds()
This file implements a DecisionTreeTripleFeatureNode, which is a specific type of node used for a Dec...
virtual bool predict_(VectorFloat &inputVector)
virtual bool getModel(std::ostream &stream) const
This file implements a DecisionTreeClusterNode, which is a specific type of node used for a DecisionT...
virtual bool save(const std::string filename) const
virtual bool load(const std::string filename)
virtual bool deepCopyFrom(const Classifier *classifier)
virtual bool print() const
const Node * getTree() const
This file implements a DecisionTreeNode, which is a specific base node used for a DecisionTree...
virtual bool train_(ClassificationData &trainingData)
virtual Node * deepCopyTree() const
This file implements a DecisionTreeThresholdNode, which is a specific type of node used for a Decisio...