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();
151 virtual bool getModel( std::ostream &stream )
const;
192 bool loadLegacyModelFromFile_v2( std::fstream &file );
193 bool loadLegacyModelFromFile_v3( std::fstream &file );
196 Float getNodeDistance(
const VectorFloat &x,
const UINT nodeID );
200 std::map< UINT, VectorFloat > nodeClusters;
209 #endif //GRT_DECISION_TREE_HEADER
virtual bool saveModelToFile(std::fstream &file) const
virtual bool predict(VectorFloat inputVector)
This file implements a DecisionTreeTripleFeatureNode, which is a specific type of node used for a Dec...
const DecisionTreeNode * getTree() const
DecisionTreeNode * deepCopyDecisionTreeNode() const
bool loadLegacyModelFromFile_v1(std::fstream &file)
virtual bool train_(ClassificationData &trainingData)
virtual bool train(ClassificationData trainingData)
virtual bool predict_(VectorFloat &inputVector)
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)
virtual bool deepCopyFrom(const Classifier *classifier)
This file implements a DecisionTreeClusterNode, which is a specific type of node used for a DecisionT...
DecisionTreeNode * deepCopyTree() const
virtual bool recomputeNullRejectionThresholds()
virtual bool saveModelToFile(std::string filename) const
virtual bool print() const
virtual bool loadModelFromFile(std::fstream &file)
This file implements a DecisionTreeNode, which is a specific base node used for a DecisionTree...
virtual bool loadModelFromFile(std::string filename)
DecisionTree & operator=(const DecisionTree &rhs)
bool setDecisionTreeNode(const DecisionTreeNode &node)
virtual ~DecisionTree(void)
virtual bool getModel(std::ostream &stream) const
This file implements a DecisionTreeThresholdNode, which is a specific type of node used for a Decisio...