#include <MultiStumpLearner.h>
Inheritance diagram for MultiStumpLearner:
Public Member Functions | |
virtual BaseLearner * | create () |
Returns itself as object. | |
virtual void | run (InputData *pData) |
Run the learner to build the classifier on the given data. | |
virtual void | save (ofstream &outputStream, const int numTabs=0) |
Save the current object information needed for classification, that is the threshold list. | |
virtual void | load (nor_utils::StreamTokenizer &st) |
Load the xml file that contains the serialized information needed for the classification and that belongs to this class. | |
Private Member Functions | |
virtual char | phi (double val, int classIdx) |
A discriminative function. | |
virtual void | findThresholds (InputData *pData, const int columnIdx, vector< double > &thresholds, vector< sRates > &mu, vector< char > &v) |
Find the thresholds (one for each class) for column columnIndex. | |
Private Attributes | |
vector< double > | _thresholds |
The thresholds (one for each class) of the decision stump. |
There is a threshold for every class.
Definition at line 50 of file MultiStumpLearner.h.
|
Returns itself as object.
Implements BaseLearner. Definition at line 60 of file MultiStumpLearner.h. |
|
Find the thresholds (one for each class) for column columnIndex.
Definition at line 101 of file MultiStumpLearner.cpp. References StumpLearner::_bestErrors, StumpLearner::_halfWeightsPerClass, StumpLearner::_leftErrors, StumpLearner::_rightErrors, BaseLearner::_smallVal, StumpLearner::_weightsPerClass, InputData::getClass(), ClassMappings::getNumClasses(), and InputData::getWeight(). |
|
Load the xml file that contains the serialized information needed for the classification and that belongs to this class.
Reimplemented from StumpLearner. Definition at line 265 of file MultiStumpLearner.cpp. References MultiStumpLearner::_thresholds, StumpLearner::load(), and UnSerialization::seekAndParseVectorTag(). |
|
A discriminative function.
Implements StumpLearner. Definition at line 91 of file MultiStumpLearner.cpp. References MultiStumpLearner::_thresholds. |
|
Run the learner to build the classifier on the given data.
Implements BaseLearner. Definition at line 38 of file MultiStumpLearner.cpp. References ClassMappings::getNumClasses(). |
|
Save the current object information needed for classification, that is the threshold list.
Reimplemented from StumpLearner. Definition at line 254 of file MultiStumpLearner.cpp. References MultiStumpLearner::_thresholds, StumpLearner::save(), and Serialization::vectorTag(). |