#include <Stump.hh>

Classes | |
| struct | stump_experience |
Public Types | |
| enum | splitTypes { ONLY, CUT } |
Public Member Functions | |
| void | buildStump () |
| float | calcGainRatio (int dim, float val, int type, float I) |
| float | calcIforSet (const std::vector< stump_experience * > &instances) |
| float | calcIofP (float *P, int size) |
| void | compareSplits (float gainRatio, int dim, float val, int type, int *nties, float *bestGainRatio, int *bestDim, float *bestVal, int *bestType) |
| int | findMatching (const std::vector< stump_experience * > &instances, int dim, int val, int minConf) |
| float | getConf (const std::vector< float > &input) |
| virtual Stump * | getCopy () |
| void | implementSplit (float bestGainRatio, int bestDim, float bestVal, int bestType) |
| void | initStump () |
| void | outputProbabilities (std::multiset< float > outputs, std::map< float, float > *retval) |
| bool | passTest (int dim, float val, int type, const std::vector< float > &input) |
| void | printStump () |
| void | setParams (float margin, float forestPct, float minRatio) |
| float * | sortOnDim (int dim) |
| Stump (int id, int trainMode, int trainFreq, int m, float featPct, Random rng) | |
| Stump (const Stump &) | |
| void | testInstance (const std::vector< float > &input, std::map< float, float > *retval) |
| void | testPossibleSplits (float *bestGainRatio, int *bestDim, float *bestVal, int *bestType) |
| bool | trainInstance (classPair &instance) |
| bool | trainInstances (std::vector< classPair > &instances) |
| ~Stump () | |
Public Attributes | |
| bool | ALLOW_ONLY_SPLITS |
| float | LOSS_MARGIN |
| float | MIN_GAIN_RATIO |
| int | nExperiences |
| float | REBUILD_RATIO |
| float | SPLIT_MARGIN |
| bool | SPLITDEBUG |
| bool | STDEBUG |
Private Attributes | |
| stump_experience | allExp [N_STUMP_EXP] |
| int | dim |
| std::vector< stump_experience * > | experiences |
| float | featPct |
| const int | freq |
| float | gainRatio |
| const int | id |
| std::multiset< float > | leftOutputs |
| const int | M |
| const int | mode |
| int | nnodes |
| int | nOutput |
| std::multiset< float > | rightOutputs |
| Random | rng |
| int | type |
| float | val |
| enum Stump::splitTypes |
| Stump::Stump | ( | int | id, |
| int | trainMode, | ||
| int | trainFreq, | ||
| int | m, | ||
| float | featPct, | ||
| Random | rng | ||
| ) |
| Stump::Stump | ( | const Stump & | s | ) |
| Stump::~Stump | ( | ) |
| void Stump::buildStump | ( | ) |
| float Stump::calcGainRatio | ( | int | dim, |
| float | val, | ||
| int | type, | ||
| float | I | ||
| ) |
| float Stump::calcIforSet | ( | const std::vector< stump_experience * > & | instances | ) |
| float Stump::calcIofP | ( | float * | P, |
| int | size | ||
| ) |
| void Stump::compareSplits | ( | float | gainRatio, |
| int | dim, | ||
| float | val, | ||
| int | type, | ||
| int * | nties, | ||
| float * | bestGainRatio, | ||
| int * | bestDim, | ||
| float * | bestVal, | ||
| int * | bestType | ||
| ) |
| int Stump::findMatching | ( | const std::vector< stump_experience * > & | instances, |
| int | dim, | ||
| int | val, | ||
| int | minConf | ||
| ) |
| float Stump::getConf | ( | const std::vector< float > & | input | ) | [virtual] |
Implements Classifier.
| Stump * Stump::getCopy | ( | ) | [virtual] |
Implements Classifier.
| void Stump::implementSplit | ( | float | bestGainRatio, |
| int | bestDim, | ||
| float | bestVal, | ||
| int | bestType | ||
| ) |
| void Stump::initStump | ( | ) |
| void Stump::outputProbabilities | ( | std::multiset< float > | outputs, |
| std::map< float, float > * | retval | ||
| ) |
| bool Stump::passTest | ( | int | dim, |
| float | val, | ||
| int | type, | ||
| const std::vector< float > & | input | ||
| ) |
| void Stump::printStump | ( | ) |
| void Stump::setParams | ( | float | margin, |
| float | forestPct, | ||
| float | minRatio | ||
| ) |
| float * Stump::sortOnDim | ( | int | dim | ) |
| void Stump::testInstance | ( | const std::vector< float > & | input, |
| std::map< float, float > * | retval | ||
| ) | [virtual] |
Implements Classifier.
| void Stump::testPossibleSplits | ( | float * | bestGainRatio, |
| int * | bestDim, | ||
| float * | bestVal, | ||
| int * | bestType | ||
| ) |
| bool Stump::trainInstance | ( | classPair & | instance | ) | [virtual] |
Implements Classifier.
| bool Stump::trainInstances | ( | std::vector< classPair > & | instances | ) | [virtual] |
Implements Classifier.
stump_experience Stump::allExp[N_STUMP_EXP] [private] |
int Stump::dim [private] |
std::vector<stump_experience*> Stump::experiences [private] |
float Stump::featPct [private] |
const int Stump::freq [private] |
float Stump::gainRatio [private] |
std::multiset<float> Stump::leftOutputs [private] |
| float Stump::LOSS_MARGIN |
| float Stump::MIN_GAIN_RATIO |
const int Stump::mode [private] |
int Stump::nnodes [private] |
int Stump::nOutput [private] |
| float Stump::REBUILD_RATIO |
std::multiset<float> Stump::rightOutputs [private] |
Random Stump::rng [private] |
| float Stump::SPLIT_MARGIN |
int Stump::type [private] |
float Stump::val [private] |