21 #ifndef _INDIRECT_BINARY_CLASSIFIER_H
22 #define _INDIRECT_BINARY_CLASSIFIER_H
36 template<
class Policy>
41 typedef typename Policy::ReturnType ReturnType;
59 static std::string signature() {
60 return "x-decision-stump";
67 template<
class DataType>
68 inline int operator() (
const DataType *features,
long stride)
const
70 return Policy::evaluate_feature( features[(
long)(
feature_index) * stride] );
77 template<
class Policy>
80 template<
class Policy>
81 std::ostream & operator << (std::ostream & out, const IndirectBinaryClassifier<Policy> & s);
86 template<
class Policy>
93 template<
class Policy>
94 std::ostream & operator << (std::ostream & out, const IndirectBinaryClassifier<Policy> & s)
96 out << static_cast<const Policy&>(s) <<
' ' << s.feature_index;
Types involved in boosting.
IndirectBinaryClassifier< Policy > OptimizedType
no more optimization
Definition: IndirectBinaryClassifier.h:44
ClassifierType
Definition: Types.h:31
static const ClassifierType Type
BinaryClassifier inherits type from Policy.
Definition: IndirectBinaryClassifier.h:52
int feature_index
the index of the feature used during the classification stage
Definition: IndirectBinaryClassifier.h:49
A classifier composed by an index of a feature and an Evaluation Policy.
Definition: IndirectBinaryClassifier.h:37
int operator()(const DataType *features, long stride) const
Definition: IndirectBinaryClassifier.h:68