A Weak Classifier based on a Feature Extractor policy.
More...
#include <DecisionStump.h>
|
| int | evaluate_feature (DataType value) const |
| |
|
void | rescale (int sx, int sy, int sgn) |
| | this function permits to change the th for rescaling
|
| |
|
|
static std::string | signature () |
| |
|
|
int | parity |
| | parity for this classifier (-1, 1)
|
| |
|
DataType | th |
| | threshold value
|
| |
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)
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: