31 #ifndef GRT_TREE_HEADER 32 #define GRT_TREE_HEADER 41 enum TrainingMode{BEST_ITERATIVE_SPILT=0,BEST_RANDOM_SPLIT,NUM_TRAINING_MODES};
52 Tree(
const UINT numSplittingSteps=100,
const UINT minNumSamplesPerNode=5,
const UINT maxDepth=10,
const bool removeFeaturesAtEachSpilt =
false,
const TrainingMode trainingMode = BEST_ITERATIVE_SPILT);
65 virtual bool clear()
override;
72 virtual bool print()
const override;
81 virtual bool getModel( std::ostream &stream )
const override;
90 virtual Node* deepCopyTree()
const;
97 const Node* getTree()
const;
104 UINT getTrainingMode()
const;
114 UINT getNumSplittingSteps()
const;
122 UINT getMinNumSamplesPerNode()
const;
129 UINT getMaxDepth()
const;
136 UINT getPredictedNodeID()
const;
143 bool getRemoveFeaturesAtEachSpilt()
const;
151 bool setTrainingMode(
const TrainingMode trainingMode);
165 bool setNumSplittingSteps(
const UINT numSplittingSteps);
175 bool setMinNumSamplesPerNode(
const UINT minNumSamplesPerNode);
184 bool setMaxDepth(
const UINT maxDepth);
194 bool setRemoveFeaturesAtEachSpilt(
const bool removeFeaturesAtEachSpilt);
198 TrainingMode trainingMode;
199 UINT numSplittingSteps;
200 UINT minNumSamplesPerNode;
202 bool removeFeaturesAtEachSpilt;
208 #endif //GRT_TREE_HEADER
virtual bool getModel(std::ostream &stream) const
virtual bool print() const
This class contains the main Node base class.
This is the main base class that all GRT machine learning algorithms should inherit from...