21 #ifndef _ABS_DECISIONSTUMP_H
22 #define _ABS_DECISIONSTUMP_H
37 template<
class DataType>
43 typedef int ReturnType;
53 return (value <
thn) ? -1 : (value > thp) ? 1 : 0;
56 static std::string signature() {
57 return "absdecisionstump";
61 template<
class DataType>
68 template<
class DataType>
69 inline std::ostream & operator << (std::ostream & out, const AbsDecisionStump<DataType> & s)
71 out << s.thn <<
' ' << s.thp;
Types involved in boosting.
static const ClassifierType Type
AbsDecisionStump is a DiscreteClassifier.
Definition: AbsDecisionStump.h:46
ClassifierType
Definition: Types.h:31
int evaluate_feature(DataType value) const
convert the feature value to {-1,0,+1} using thresholds
Definition: AbsDecisionStump.h:51
A Weak Classifier based on a Feature Extractor policy.
Definition: AbsDecisionStump.h:38
a dicrete classifier returns {-1,+1}
Definition: Types.h:32
DataType thn
neg, pos threshold
Definition: AbsDecisionStump.h:40