#include <Forest.h>
Public Member Functions | |
void | appendCorrection (std::vector< Event * > eventsp, Int_t treenum) |
void | doRegression (Int_t nodeLimit, Int_t treeLimit, Double_t learningRate, LossFunction *l, const char *savetreesdirectory, bool saveTrees) |
void | doStochasticRegression (Int_t nodeLimit, Int_t treeLimit, Double_t learningRate, Double_t fraction, LossFunction *l) |
Forest () | |
Forest (std::vector< Event * > &trainingEvents, std::vector< Event * > &testEvents) | |
void | generate (Int_t numTrainEvents, Int_t numTestEvents, Double_t sigma) |
std::vector< Event * > | getTestEvents () |
std::vector< Event * > | getTrainingEvents () |
void | listEvents (std::vector< std::vector< Event * > > &e) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! More... | |
void | loadForestFromXML (const char *directory, unsigned int numTrees) |
void | predictEvents (std::vector< Event * > eventsp, unsigned int trees) |
void | prepareRandomSubsample (Double_t fraction) |
std::vector< Double_t > | rankVariables () |
void | setTestEvents (std::vector< Event * > &testingEvents) |
void | setTrainingEvents (std::vector< Event * > &trainingEvents) |
unsigned int | size () |
void | sortEventVectors (std::vector< std::vector< Event * > > &e) |
void | updateEvents (Tree *tree) |
void | updateRegTargets (Tree *tree, Double_t learningRate, LossFunction *l) |
~Forest () | |
Private Attributes | |
std::vector< std::vector < Event * > > | events |
std::vector< std::vector < Event * > > | subSample |
std::vector< Event * > | testEvents |
std::vector< Tree * > | trees |
Definition at line 51 of file Forest.cc.
References setTestEvents(), and setTrainingEvents().
Forest::~Forest | ( | ) |
void Forest::appendCorrection | ( | std::vector< Event * > | eventsp, |
Int_t | treenum | ||
) |
Definition at line 405 of file Forest.cc.
References Tree::filterEvents(), MainPageGenerator::tree, trees, and updateEvents().
Referenced by predictEvents().
void Forest::doRegression | ( | Int_t | nodeLimit, |
Int_t | treeLimit, | ||
Double_t | learningRate, | ||
LossFunction * | l, | ||
const char * | savetreesdirectory, | ||
bool | saveTrees | ||
) |
Definition at line 335 of file Forest.cc.
References Tree::buildTree(), EnergyCorrector::c, gather_cfg::cout, events, i, alignCSCRings::s, Tree::saveToXML(), sortEventVectors(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, MainPageGenerator::tree, trees, and updateRegTargets().
void Forest::doStochasticRegression | ( | Int_t | nodeLimit, |
Int_t | treeLimit, | ||
Double_t | learningRate, | ||
Double_t | fraction, | ||
LossFunction * | l | ||
) |
Definition at line 475 of file Forest.cc.
References EnergyCorrector::c, gather_cfg::cout, events, i, prepareRandomSubsample(), alignCSCRings::s, sortEventVectors(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, subSample, trees, and updateRegTargets().
void Forest::generate | ( | Int_t | numTrainEvents, |
Int_t | numTestEvents, | ||
Double_t | sigma | ||
) |
Definition at line 531 of file Forest.cc.
References gather_cfg::cout, Event::data, alignCSCRings::e, events, f, i, Event::id, visualization-live-secondInstance_cfg::m, gen::n, Event::predictedValue, alignCSCRings::r, Event::sortingIndex, testEvents, Event::trueValue, findQualityFiles::v, and x.
std::vector< Event * > Forest::getTestEvents | ( | ) |
std::vector< Event * > Forest::getTrainingEvents | ( | ) |
void Forest::listEvents | ( | std::vector< std::vector< Event * > > & | e | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Definition at line 147 of file Forest.cc.
References gather_cfg::cout, alignCSCRings::e, i, and j.
void Forest::loadForestFromXML | ( | const char * | directory, |
unsigned int | numTrees | ||
) |
Definition at line 420 of file Forest.cc.
References contentValuesFiles::fullPath, i, contentValuesCheck::ss, and trees.
void Forest::predictEvents | ( | std::vector< Event * > | eventsp, |
unsigned int | trees | ||
) |
Definition at line 382 of file Forest.cc.
References appendCorrection(), i, and trees.
Referenced by CalculatePt_FullPrecision(), and getPt().
void Forest::prepareRandomSubsample | ( | Double_t | fraction | ) |
Definition at line 446 of file Forest.cc.
References begin, end, events, i, shuffle(), sortEventVectors(), subSample, and findQualityFiles::v.
Referenced by doStochasticRegression().
std::vector< Double_t > Forest::rankVariables | ( | ) |
Definition at line 207 of file Forest.cc.
References gather_cfg::cout, events, i, j, bookConverter::max, trees, findQualityFiles::v, and w.
void Forest::setTestEvents | ( | std::vector< Event * > & | testingEvents | ) |
void Forest::setTrainingEvents | ( | std::vector< Event * > & | trainingEvents | ) |
Definition at line 87 of file Forest.cc.
References Event::data, alignCSCRings::e, events, and i.
Referenced by Forest().
void Forest::sortEventVectors | ( | std::vector< std::vector< Event * > > & | e | ) |
Definition at line 191 of file Forest.cc.
References begin, compareEvents(), alignCSCRings::e, end, i, and Event::sortingIndex.
Referenced by doRegression(), doStochasticRegression(), and prepareRandomSubsample().
void Forest::updateEvents | ( | Tree * | tree | ) |
Definition at line 305 of file Forest.cc.
References alignCSCRings::e, Tree::getTerminalNodes(), j, Event::predictedValue, and findQualityFiles::v.
Referenced by appendCorrection().
void Forest::updateRegTargets | ( | Tree * | tree, |
Double_t | learningRate, | ||
LossFunction * | l | ||
) |
Definition at line 263 of file Forest.cc.
References Event::data, alignCSCRings::e, LossFunction::fit(), Tree::getTerminalNodes(), j, Event::predictedValue, LossFunction::target(), and findQualityFiles::v.
Referenced by doRegression(), and doStochasticRegression().
|
private |
Definition at line 53 of file Forest.h.
Referenced by eventsfwlite.Events::__getattr__(), eventsfwlite.Events::__init__(), doRegression(), doStochasticRegression(), Forest(), generate(), getTrainingEvents(), looper.Looper::loop(), prepareRandomSubsample(), looper.Looper::process(), rankVariables(), setTrainingEvents(), and ~Forest().
|
private |
Definition at line 54 of file Forest.h.
Referenced by doStochasticRegression(), and prepareRandomSubsample().
|
private |
Definition at line 55 of file Forest.h.
Referenced by generate(), getTestEvents(), setTestEvents(), and ~Forest().
|
private |
Definition at line 56 of file Forest.h.
Referenced by appendCorrection(), doRegression(), doStochasticRegression(), loadForestFromXML(), predictEvents(), rankVariables(), size(), and ~Forest().