X-Boost  2.3.8
Public Types | Public Member Functions | Static Public Member Functions | List of all members
AdaBoostTrainer< Oracle > Class Template Reference

#include <AdaBoostTrainer.h>

Inherits AdaBoost< Oracle::ClassifierType >, and Oracle.

Public Types

typedef PatternAggregator
< WeightedPattern< typename
Oracle::DataType >, typename
Oracle::ParamType > 
AdaBoostPattern
 
typedef DataSetHandle
< AdaBoostPattern
DataSetType
 DataSet required by AdaBoostTrainer.
 
typedef Oracle::ClassifierType WeakClassifierType
 Weak Classifier Type, reported by Oracle.
 
typedef BoostClassifier
< WeakClassifierType
ClassifierType
 The Final Strong Classifier as Additive Model.
 
typedef
ClassifierType::ClassifierListType 
ClassifierListType
 The internal list, inside BoostClassifier.
 

Public Member Functions

void EnableMAdaBoost (bool mada)
 Set MAdaBoost Variant.
 
template<class SourceDataSetType >
void SetValidationSet (const SourceDataSetType &set)
 
const DataSetTypeGetValidationSet () const
 return the validation Set
 
void ResetValidationSet (double positive_weight=-1.0)
 
void Restart (bool reOptimize)
 
ClassifierTypeClassifier ()
 Direct Access to Final Classifier.
 
const ClassifierTypeClassifier () const
 Direct Access to Final Classifier.
 
bool Train ()
 
bool Test ()
 
ReportTest TestAndExportStat (double th, int max_concurrent_jobs)
 

Static Public Member Functions

static std::string signature ()
 the internal signature of classifier (not the trainer)
 
- Static Public Member Functions inherited from AdaBoost< Oracle::ClassifierType >
static bool Update (const Oracle::ClassifierType &H, DataSetType &training_set, DataSetType &validation_set, bool verbose=true)
 

Detailed Description

template<class Oracle>
class AdaBoostTrainer< Oracle >

Implements an AdaBoost Discrete/Gentle/Real Train algorithm using a generic Oracle (the hypothesis generator) The Classifier will be BoostClassifier on a WeakClassifier type. It implements also MAdaBoost weight update rule.

Parameters
Oracleis an hypotheis generator policy
Note
true class A positive +1, false class B negative -1

Member Function Documentation

template<class Oracle >
void AdaBoostTrainer< Oracle >::ResetValidationSet ( double  positive_weight = -1.0)
inline

Reset weight of validation set

Parameters
positive_weightset the weight of positive set
template<class Oracle >
void AdaBoostTrainer< Oracle >::Restart ( bool  reOptimize)

Reset weights and alphas and retrain the classifier

Parameters
reOptimizechange classifier params in order to deal with better response
template<class Oracle >
bool AdaBoostTrainer< Oracle >::Test ( )

Test current network (all classifiers) on Validation Set prints the result to output console

template<class Oracle >
ReportTest AdaBoostTrainer< Oracle >::TestAndExportStat ( double  th,
int  max_concurrent_jobs 
)

Execute the test and report stats

template<class Oracle >
bool AdaBoostTrainer< Oracle >::Train ( )

Performs a single training cycle Extract the best classifier from Oracle using Training Set and update the Validation Set

Note
not update the Oracle Training Set: it has been done manually

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