#include <AdaBoostMHLearner.h>
Public Member Functions | |
AdaBoostLearner (nor_utils::Args &args, int verbose=1) | |
The constructor. | |
void | run (int numIterations, const string &trainFileName, const string &testFileName="") |
Start the learning process. | |
Protected Member Functions | |
double | updateWeights (InputData *pTrainData, BaseLearner *pWeakHypothesis) |
Updates the weights of the examples. | |
Protected Attributes | |
vector< BaseLearner * > | _foundHypotheses |
The list of the hypotheses found. | |
InputData * | _pTrainData |
A pointer to the training data. | |
InputData * | _pTestData |
A pointer to the test data (if exists). | |
string | _basicLearnerName |
The name of the basic learner used by AdaBoost. | |
string | _shypFileName |
File name of the strong hypothesis. | |
int | _maxTime |
Time limit for the whole processing. Default: no time limit (-1). | |
double | _theta |
the value of theta. Default = 0. | |
nor_utils::Args & | _args |
The arguments defined by the user. | |
int | _verbose |
Verbose level. | |
string | _outputInfoFile |
The filename of the step-by-step information file that will be updated. | |
const double | _smallVal |
A small value, to solve numeric issues. |
This class performs the meta-learning by calling the weak learners and updating the weights.
Definition at line 47 of file AdaBoostMHLearner.h.
|
The constructor. It initializes the variable and set them using the information provided by the arguments passed. They are parsed using the helpers provided by class Params.
Definition at line 40 of file AdaBoostMHLearner.cpp. References AdaBoostLearner::_basicLearnerName, AdaBoostLearner::_outputInfoFile, Args::getValue(), Args::hasArgument(), and BaseLearner::RegisteredLearners(). |
|
Start the learning process.
Definition at line 96 of file AdaBoostMHLearner.cpp. References AdaBoostLearner::_args, AdaBoostLearner::_basicLearnerName, AdaBoostLearner::_shypFileName, AdaBoostLearner::_verbose, BaseLearner::createInputData(), InputData::initOptions(), MultiBoost::IT_TEST, MultiBoost::IT_TRAIN, InputData::load(), and BaseLearner::RegisteredLearners(). |
|
Updates the weights of the examples. The re-weighting of (the weight vector over all the examples and classes) is done using the following formula
where Z is a normalization factor, and it is defined as
where is the number of examples, the number of classes, is the confidence in the weak classifier, is the classification of example for class with the classifier found at the current iteration (see BaseLearner::classify()), and is the binary label of that example, defined in InputData::getBinaryClass().
Definition at line 207 of file AdaBoostMHLearner.cpp. References BaseLearner::classify(), BaseLearner::getAlpha(), InputData::getBinaryClass(), ClassMappings::getNumClasses(), InputData::getNumExamples(), InputData::getWeight(), and InputData::setWeight(). |
|
Verbose level. There are three levels of verbosity:
Definition at line 123 of file AdaBoostMHLearner.h. Referenced by AdaBoostLearner::run(). |