21 #ifndef _DECISION_STUMP_H
22 #define _DECISION_STUMP_H
44 template<
class DataType>
52 typedef int ReturnType;
67 static std::string signature() {
68 return "decisionstump";
72 inline void rescale(
int sx,
int sy,
int sgn)
74 th = (int) (
th*sx*sy)*sgn;
79 template<
class DataType>
86 template<
class DataType>
87 inline std::ostream & operator << (std::ostream & out, const DecisionStump<DataType> & s)
89 out << s.parity <<
' ' << s.th;
Types involved in boosting.
int parity
parity for this classifier (-1, 1)
Definition: DecisionStump.h:47
A Weak Classifier based on a Feature Extractor policy.
Definition: DecisionStump.h:45
static const ClassifierType Type
DecisionStump is a Discrete Classifier.
Definition: DecisionStump.h:55
ClassifierType
Definition: Types.h:31
int evaluate_feature(DataType value) const
Definition: DecisionStump.h:62
void rescale(int sx, int sy, int sgn)
this function permits to change the th for rescaling
Definition: DecisionStump.h:72
a dicrete classifier returns {-1,+1}
Definition: Types.h:32
DataType th
threshold value
Definition: DecisionStump.h:50