yat  0.14.5pre
Public Types | Public Member Functions | List of all members
theplu::yat::classifier::EnsembleBuilder< Classifier, Data > Class Template Reference

Class for ensembles of supervised classifiers. More...

#include <yat/classifier/EnsembleBuilder.h>

Public Types

typedef Classifier classifier_type
 Type of classifier that ensemble is built on.
 
typedef Data data_type
 

Public Member Functions

 EnsembleBuilder (const Classifier &, const Data &, const Sampler &)
 
 EnsembleBuilder (const Classifier &, const Data &, const Sampler &, FeatureSelector &)
 
virtual ~EnsembleBuilder (void)
 
void build (void)
 Generate ensemble. More...
 
const Classifier & classifier (size_t i) const
 
unsigned long size (void) const
 
const std::vector< std::vector
< statistics::Averager > > & 
validate (void)
 Generate validation data for ensemble. More...
 
void predict (const Data &data, std::vector< std::vector< statistics::Averager > > &)
 

Detailed Description

template<class Classifier, class Data>
class theplu::yat::classifier::EnsembleBuilder< Classifier, Data >

Class for ensembles of supervised classifiers.

Member Typedef Documentation

template<class Classifier , class Data >
typedef Data theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::data_type

Type of container used for storing data. Must be MatrixLookup, MatrixLookupWeighted, or KernelLookup

Constructor & Destructor Documentation

template<class Classifier , class Data >
theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::EnsembleBuilder ( const Classifier &  sc,
const Data &  data,
const Sampler sampler 
)

Constructor.

template<class Classifier , class Data >
theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::EnsembleBuilder ( const Classifier &  sc,
const Data &  data,
const Sampler sampler,
FeatureSelector fs 
)

Constructor.

template<class Classifier , class Data >
theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::~EnsembleBuilder ( void  )
virtual

Destructor.

Member Function Documentation

template<class Classifier , class Data >
void theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::build ( void  )

Generate ensemble.

Function trains each member of the Ensemble.

template<class Classifier , class Data >
const Classifier & theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::classifier ( size_t  i) const
Returns
ith classifier
template<class Classifier , class Data >
void theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::predict ( const Data &  data,
std::vector< std::vector< statistics::Averager > > &  result 
)

Predict a dataset using the ensemble.

If data is a KernelLookup each column should correspond to a test sample and each row should correspond to a training sample. More exactly row $ i $ in data should correspond to the same sample as row/column $ i $ in the training kernel corresponds to.

template<class Classifier , class Data >
unsigned long theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::size ( void  ) const
Returns
Number of classifiers in ensemble. Prior build(void) is issued size is zero.
template<class Classifier , class Data >
const std::vector< std::vector< statistics::Averager > > & theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::validate ( void  )

Generate validation data for ensemble.

validate()[i][j] return averager for class i for sample j


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

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5