X-Boost  2.3.8
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
DecisionStump< DataType > Struct Template Reference

A Weak Classifier based on a Feature Extractor policy. More...

#include <DecisionStump.h>

Public Types

typedef int ReturnType
 

Public Member Functions

int evaluate_feature (DataType value) const
 
void rescale (int sx, int sy, int sgn)
 this function permits to change the th for rescaling
 

Static Public Member Functions

static std::string signature ()
 

Public Attributes

int parity
 parity for this classifier (-1, 1)
 
DataType th
 threshold value
 

Static Public Attributes

static const ClassifierType Type = DicreteClassifier
 DecisionStump is a Discrete Classifier.
 

Detailed Description

template<class DataType>
struct DecisionStump< DataType >

A Weak Classifier based on a Feature Extractor policy.

The FeatureExtractor have to implement a response method that returns an integer scalar quantity parity=+1 -> class = (value < th) ? 1 : -1; parity=-1 -> class = (value > th) ? 1 : -1;

Note
parity=1 and parity=-1 are not exact opposite cases due to missing of =
value=th is an ambiguos case
Todo:
try to compact BoostableClassifier with DecisionStump in order to reduce number of multiplication (parity * alpha) (e.g. using RealDecisionStump classes)

Member Function Documentation

template<class DataType>
int DecisionStump< DataType >::evaluate_feature ( DataType  value) const
inline

convert the feature value to {-1,+1} using internal parity and threshold parity=1 -> value < th ? 1 : -1 parity=-1 -> value > th ? 1 : -1


The documentation for this struct was generated from the following file: