X-Boost  2.3.8
Public Types | Public Member Functions | List of all members
BinaryClassifierOracle< FeatureGenerator, ClassifierPolicy, Metric, Aggregator > Struct Template Reference

#include <BinaryClassifierOracle.h>

Public Types

typedef
FeatureGenerator::FeatureType 
FeatureType
 The Feature Extracted by FeatureGenerator.
 
typedef BinaryClassifier
< FeatureType,
ClassifierPolicy > 
WeakClassifierType
 The weak classifier provided by this oracle.
 
typedef BoostableClassifier
< WeakClassifierType
ClassifierType
 Additive Regression Final Classifier.
 

Public Member Functions

template<class SourceDataSet >
void SetTrainingSet (const SourceDataSet &set)
 Set the training set used to recover the threshold.
 
void SetFeatureGenerator (FeatureGenerator &f)
 Associate a Feature Generator to Decision Stump Generator.
 
DataSetHandle< Aggregator > & GetTrainingSet ()
 return R/W the training set
 
void SetPreloadSize (int n)
 
void SetFastHeuristic (bool enable, bool reoptimize, int size)
 
bool GetHypothesis (WeakClassifierType &bestH)
 
double Fast_Optimize (WeakClassifierType &h)
 
double Optimize (WeakClassifierType &h)
 Using current metrics try to recompute parameters associated to this feature.
 

Detailed Description

template<class FeatureGenerator, class ClassifierPolicy, class Metric, class Aggregator>
struct BinaryClassifierOracle< FeatureGenerator, ClassifierPolicy, Metric, Aggregator >

A base class for training a classifier using Integral Images with some kind of Features (HaarFeature). Find the best threshold of a scalar feature on the trainingset using associated weights, try to maximize AdaBoost W+ param or others Metric

Implements metric based on a list of sorted PatternResponse

Parameters
FeatureGeneratorgenerates Feature of type FeatureType
Note
FeatureType is the type of feature involved in training
PatternType must have a GetWeight() method implemented.

Member Function Documentation

template<class FeatureGenerator , class ClassifierPolicy , class Metric , class Aggregator >
double BinaryClassifierOracle< FeatureGenerator, ClassifierPolicy, Metric, Aggregator >::Fast_Optimize ( WeakClassifierType h)
inline

versione veloce per calcolare la miglior response che fa uso di un istogramma/bin/bucker per evitare la sort TODO serve, per WeakClassifierType, il valore minimo e massimo della response

template<class FeatureType , class ClassifierPolicy , class Metric , class Aggregator >
bool BinaryClassifierOracle< FeatureType, ClassifierPolicy, Metric, Aggregator >::GetHypothesis ( WeakClassifierType bestH)

Return the best h for current data set. This is the real core of this module: test all FeatureType and produce the bestH classifier with the best of them

template<class FeatureGenerator , class ClassifierPolicy , class Metric , class Aggregator >
void BinaryClassifierOracle< FeatureGenerator, ClassifierPolicy, Metric, Aggregator >::SetFastHeuristic ( bool  enable,
bool  reoptimize,
int  size 
)
inline

Enable/Disable the Fast-optimize heuristic

Parameters
enableenable/disable
sizenumber of bins
template<class FeatureGenerator , class ClassifierPolicy , class Metric , class Aggregator >
void BinaryClassifierOracle< FeatureGenerator, ClassifierPolicy, Metric, Aggregator >::SetPreloadSize ( int  n)
inline

Set the preload size


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