latest version v1.9 - last update 10 Apr 2010 |
Implementation of bagging classification. More...
#include <ltiBagging.h>
Classes | |
class | parameters |
the parameters for the class bagging More... | |
Public Member Functions | |
bagging () | |
bagging (const parameters &par) | |
bagging (const bagging &other) | |
virtual | ~bagging () |
virtual const char * | getTypeName () const |
bool | train (const dmatrix &input, const ivector &ids) |
bool | classify (const dvector &feature, classifier::outputVector &result) const |
bagging & | copy (const bagging &other) |
bagging & | operator= (const bagging &other) |
virtual classifier * | clone () const |
const parameters & | getParameters () const |
bool | read (ioHandler &handler, const bool complete=true) |
bool | write (ioHandler &handler, const bool complete=true) const |
Protected Attributes | |
std::list < supervisedInstanceClassifier * > * | ensemble |
supervisedInstanceClassifierFactory | factory |
Implementation of bagging classification.
For the bagging a set of classifiers, the ensemble, is trained with randomly drawn subsets of the training data. For classication each classifier in the ensemble is classifies the data and the different results of each classifier are combined to a single result.
lti::bagging::bagging | ( | ) |
default constructor
lti::bagging::bagging | ( | const parameters & | par | ) |
Construct a classifier using the given parameters.
lti::bagging::bagging | ( | const bagging & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::bagging::~bagging | ( | ) | [virtual] |
destructor
bool lti::bagging::classify | ( | const dvector & | feature, | |
classifier::outputVector & | result | |||
) | const |
classification and aggregating
virtual classifier* lti::bagging::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this classifier.
Implements lti::classifier.
copy data of "other" classifier.
other | the classifier to be copied |
Reimplemented from lti::classifier.
const parameters& lti::bagging::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::classifier.
virtual const char* lti::bagging::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("bagging")
Reimplemented from lti::classifier.
alias for copy member
other | the classifier to be copied |
Reimplemented from lti::classifier.
bool lti::bagging::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
read the bagging classifier from the given ioHandler
Reimplemented from lti::classifier.
bool lti::bagging::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
write to bagging classifier object to the given ioHandler
Reimplemented from lti::classifier.
std::list<supervisedInstanceClassifier*>* lti::bagging::ensemble [protected] |
list that collects all classifiers that are trained with different training data sets.
object factory for constructing the classifiers in ensemble