29 #ifndef GRT_DECISION_STUMP_HEADER
30 #define GRT_DECISION_STUMP_HEADER
107 virtual void print()
const;
140 #endif //GRT_DECISION_STUMP_HEADER
UINT getNumRandomSplits() const
static RegisterWeakClassifierModule< DecisionStump > registerModule
This is used to register the DecisionStump with the WeakClassifier base class.
UINT direction
Indicates if the decision spilt threshold is greater than (1), or less than (0)
Float decisionValue
The decision spilt threshold.
DecisionStump & operator=(const DecisionStump &rhs)
virtual bool train(ClassificationData &trainingData, VectorFloat &weights)
Float getDecisionValue() const
virtual void print() const
This is the main base class for all GRT WeakClassifiers.
DecisionStump(const UINT numRandomSplits=100)
UINT numRandomSplits
The number of random splits used to search for the best decision spilt.
virtual bool loadModelFromFile(std::fstream &file)
virtual bool saveModelToFile(std::fstream &file) const
virtual Float predict(const VectorFloat &x)
UINT getDecisionFeatureIndex() const
virtual bool deepCopyFrom(const WeakClassifier *weakClassifer)
UINT decisionFeatureIndex
The dimension that the data will be spilt on.
UINT getDirection() const