#include <SingleStumpLearner.h>
Inheritance diagram for SingleStumpLearner:
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 single threshold. | |
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 | findThreshold (InputData *pData, const int columnIdx, double &threshold, vector< sRates > &mu, vector< char > &v) |
Find the threshold for column columnIndex. | |
Private Attributes | |
double | _threshold |
the single threshold of the decision stump |
There is ONE and ONE ONLY threshold here.
Definition at line 50 of file SingleStumpLearner.h.
|
Returns itself as object.
Implements BaseLearner. Definition at line 60 of file SingleStumpLearner.h. |
|
Find the threshold for column columnIndex.
Definition at line 103 of file SingleStumpLearner.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 273 of file SingleStumpLearner.cpp. References SingleStumpLearner::_threshold, and StumpLearner::load(). |
|
A discriminative function.
Implements StumpLearner. Definition at line 93 of file SingleStumpLearner.cpp. References SingleStumpLearner::_threshold. |
|
Run the learner to build the classifier on the given data.
Implements BaseLearner. Definition at line 40 of file SingleStumpLearner.cpp. References ClassMappings::getNumClasses(). |
|
Save the current object information needed for classification, that is the single threshold.
Reimplemented from StumpLearner. Definition at line 262 of file SingleStumpLearner.cpp. References SingleStumpLearner::_threshold, StumpLearner::save(), and Serialization::standardTag(). |