#include <Forest.h>
Public Member Functions | |
void | appendCorrection (std::vector< Event * > &eventsp, Int_t treenum) |
void | appendCorrection (Event *e, Int_t treenum) |
void | doRegression (Int_t nodeLimit, Int_t treeLimit, double learningRate, LossFunction *l, const char *savetreesdirectory, bool saveTrees) |
void | doStochasticRegression (Int_t nodeLimit, Int_t treeLimit, double learningRate, double fraction, LossFunction *l) |
Forest () | |
Forest (std::vector< Event * > &trainingEvents) | |
void | generate (Int_t numTrainEvents, Int_t numTestEvents, double sigma) |
std::vector< Event * > | getTrainingEvents () |
Tree * | getTree (unsigned int i) |
void | listEvents (std::vector< std::vector< Event * > > &e) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! More... | |
void | loadForestFromXML (const char *directory, unsigned int numTrees) |
void | predictEvent (Event *e, unsigned int trees) |
void | predictEvents (std::vector< Event * > &eventsp, unsigned int trees) |
void | prepareRandomSubsample (double fraction) |
void | rankVariables (std::vector< int > &rank) |
void | saveSplitValues (const char *savefilename) |
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 learningRate, LossFunction *l) |
~Forest () | |
Private Attributes | |
std::vector< std::vector < Event * > > | events |
std::vector< std::vector < Event * > > | subSample |
std::vector< Tree * > | trees |
Forest::Forest | ( | std::vector< Event * > & | trainingEvents | ) |
Definition at line 43 of file Forest.cc.
References setTrainingEvents().
void Forest::appendCorrection | ( | std::vector< Event * > & | eventsp, |
Int_t | treenum | ||
) |
Definition at line 432 of file Forest.cc.
References Tree::filterEvents(), MainPageGenerator::tree, trees, and updateEvents().
Referenced by predictEvent(), and predictEvents().
void Forest::appendCorrection | ( | Event * | e, |
Int_t | treenum | ||
) |
Definition at line 470 of file Forest.cc.
References Tree::filterEvent(), Node::getFitValue(), Event::predictedValue, MainPageGenerator::tree, and trees.
void Forest::doRegression | ( | Int_t | nodeLimit, |
Int_t | treeLimit, | ||
double | learningRate, | ||
LossFunction * | l, | ||
const char * | savetreesdirectory, | ||
bool | saveTrees | ||
) |
Definition at line 362 of file Forest.cc.
References Tree::buildTree(), EnergyCorrector::c, 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 | learningRate, | ||
double | fraction, | ||
LossFunction * | l | ||
) |
Definition at line 541 of file Forest.cc.
References EnergyCorrector::c, 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 | sigma | ||
) |
std::vector< Event * > Forest::getTrainingEvents | ( | ) |
void Forest::listEvents | ( | std::vector< std::vector< Event * > > & | e | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Definition at line 127 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 485 of file Forest.cc.
References contentValuesFiles::fullPath, i, contentValuesCheck::ss, and trees.
void Forest::predictEvent | ( | Event * | e, |
unsigned int | trees | ||
) |
Definition at line 447 of file Forest.cc.
References appendCorrection(), i, and trees.
Referenced by l1t::EmtfPtAssignment::calculatePt().
void Forest::predictEvents | ( | std::vector< Event * > & | eventsp, |
unsigned int | trees | ||
) |
Definition at line 409 of file Forest.cc.
References appendCorrection(), i, and trees.
Referenced by CalculatePt_FullPrecision().
void Forest::prepareRandomSubsample | ( | double | fraction | ) |
Definition at line 512 of file Forest.cc.
References begin, end, events, i, shuffle(), sortEventVectors(), subSample, and findQualityFiles::v.
Referenced by doStochasticRegression().
void Forest::rankVariables | ( | std::vector< int > & | rank | ) |
Definition at line 187 of file Forest.cc.
References events, i, j, bookConverter::max, edm::second(), trees, findQualityFiles::v, and w.
void Forest::saveSplitValues | ( | const char * | savefilename | ) |
Definition at line 242 of file Forest.cc.
References begin, end, events, i, j, contentValuesCheck::ss, trees, FrontierCondition_GT_autoExpress_cfi::unique(), and findQualityFiles::v.
void Forest::setTrainingEvents | ( | std::vector< Event * > & | trainingEvents | ) |
Definition at line 68 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 171 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 332 of file Forest.cc.
References alignCSCRings::e, Tree::getTerminalNodes(), j, Event::predictedValue, and findQualityFiles::v.
Referenced by appendCorrection().
void Forest::updateRegTargets | ( | Tree * | tree, |
double | learningRate, | ||
LossFunction * | l | ||
) |
Definition at line 290 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 58 of file Forest.h.
Referenced by eventsfwlite.Events::__getattr__(), eventsfwlite.Events::__init__(), doRegression(), doStochasticRegression(), Forest(), getTrainingEvents(), looper.Looper::loop(), prepareRandomSubsample(), looper.Looper::process(), rankVariables(), saveSplitValues(), and setTrainingEvents().
|
private |
Definition at line 59 of file Forest.h.
Referenced by doStochasticRegression(), and prepareRandomSubsample().
|
private |
Definition at line 60 of file Forest.h.
Referenced by appendCorrection(), doRegression(), doStochasticRegression(), getTree(), loadForestFromXML(), predictEvent(), predictEvents(), rankVariables(), saveSplitValues(), size(), and ~Forest().