yat
0.14.5pre
|
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 > > &) |
Class for ensembles of supervised classifiers.
typedef Data theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::data_type |
Type of container used for storing data. Must be MatrixLookup, MatrixLookupWeighted, or KernelLookup
theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::EnsembleBuilder | ( | const Classifier & | sc, |
const Data & | data, | ||
const Sampler & | sampler | ||
) |
Constructor.
theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::EnsembleBuilder | ( | const Classifier & | sc, |
const Data & | data, | ||
const Sampler & | sampler, | ||
FeatureSelector & | fs | ||
) |
Constructor.
|
virtual |
Destructor.
void theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::build | ( | void | ) |
Generate ensemble.
Function trains each member of the Ensemble.
const Classifier & theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::classifier | ( | size_t | i | ) | const |
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 in data should correspond to the same sample as row/column in the training kernel corresponds to.
unsigned long theplu::yat::classifier::EnsembleBuilder< Classifier, Data >::size | ( | void | ) | const |
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