#include <Tree.h>
Public Member Functions | |
void | addXMLAttributes (TXMLEngine *xml, Node *node, XMLNodePointer_t np) |
void | buildTree (Int_t nodeLimit) |
void | calcError () |
Node * | filterEvent (Event *e) |
Node * | filterEventRecursive (Node *node, Event *e) |
void | filterEvents (std::vector< Event * > &tEvents) |
void | filterEventsRecursive (Node *node) |
Int_t | getNumTerminalNodes () |
Node * | getRootNode () |
void | getSplitValues (std::vector< std::vector< Double_t >> &v) |
void | getSplitValuesRecursive (Node *node, std::vector< std::vector< Double_t >> &v) |
std::list< Node * > & | getTerminalNodes () |
void | loadFromXML (const char *filename) |
void | loadFromXMLRecursive (TXMLEngine *xml, XMLNodePointer_t node, Node *tnode) |
void | rankVariables (std::vector< Double_t > &v) |
void | rankVariablesRecursive (Node *node, std::vector< Double_t > &v) |
void | saveToXML (const char *filename) |
void | saveToXMLRecursive (TXMLEngine *xml, Node *node, XMLNodePointer_t np) |
void | setRootNode (Node *sRootNode) |
void | setTerminalNodes (std::list< Node * > &sTNodes) |
Tree () | |
Tree (std::vector< std::vector< Event * > > &cEvents) | |
~Tree () | |
Private Attributes | |
Int_t | numTerminalNodes |
Double_t | rmsError |
Node * | rootNode |
std::list< Node * > | terminalNodes |
Tree::Tree | ( | ) |
Tree::Tree | ( | std::vector< std::vector< Event * > > & | cEvents | ) |
Definition at line 36 of file Tree.cc.
References numTerminalNodes, rootNode, emtf::Node::setEvents(), and terminalNodes.
Tree::~Tree | ( | ) |
void Tree::addXMLAttributes | ( | TXMLEngine * | xml, |
Node * | node, | ||
XMLNodePointer_t | np | ||
) |
Definition at line 322 of file Tree.cc.
References emtf::Node::getFitValue(), emtf::Node::getSplitValue(), emtf::Node::getSplitVariable(), and numToStr().
Referenced by saveToXML(), and saveToXMLRecursive().
void Tree::buildTree | ( | Int_t | nodeLimit | ) |
Definition at line 108 of file Tree.cc.
References calcError(), emtf::Node::calcOptimumSplit(), emtf::Node::filterEventsToDaughters(), emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), numTerminalNodes, rootNode, terminalNodes, and emtf::Node::theMiracleOfChildBirth().
Referenced by L1TForest::doRegression().
void Tree::calcError | ( | ) |
Definition at line 92 of file Tree.cc.
References emtf::Node::getNumEvents(), rmsError, rootNode, mathSSE::sqrt(), and terminalNodes.
Referenced by buildTree().
Definition at line 203 of file Tree.cc.
References filterEventRecursive(), and rootNode.
Referenced by L1TForest::appendCorrection().
Definition at line 215 of file Tree.cc.
References emtf::Node::filterEventToDaughter().
Referenced by filterEvent().
void Tree::filterEvents | ( | std::vector< Event * > & | tEvents | ) |
Definition at line 169 of file Tree.cc.
References filterEventsRecursive(), emtf::Node::getEvents(), and rootNode.
Referenced by L1TForest::appendCorrection().
void Tree::filterEventsRecursive | ( | Node * | node | ) |
Definition at line 185 of file Tree.cc.
References emtf::Node::filterEventsToDaughters(), emtf::Node::getLeftDaughter(), and emtf::Node::getRightDaughter().
Referenced by filterEvents().
Int_t Tree::getNumTerminalNodes | ( | ) |
Node * Tree::getRootNode | ( | ) |
void Tree::getSplitValues | ( | std::vector< std::vector< Double_t >> & | v | ) |
Definition at line 301 of file Tree.cc.
References getSplitValuesRecursive(), rootNode, and findQualityFiles::v.
void Tree::getSplitValuesRecursive | ( | Node * | node, |
std::vector< std::vector< Double_t >> & | v | ||
) |
Definition at line 271 of file Tree.cc.
References gather_cfg::cout, emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), emtf::Node::getSplitValue(), emtf::Node::getSplitVariable(), and findQualityFiles::v.
Referenced by getSplitValues().
Definition at line 76 of file Tree.cc.
References terminalNodes.
Referenced by L1TForest::updateEvents(), and L1TForest::updateRegTargets().
void Tree::loadFromXML | ( | const char * | filename | ) |
Definition at line 381 of file Tree.cc.
References loadFromXMLRecursive(), rootNode, and ExtractAppInfoFromXML::xmldoc.
void Tree::loadFromXMLRecursive | ( | TXMLEngine * | xml, |
XMLNodePointer_t | node, | ||
Node * | tnode | ||
) |
Definition at line 407 of file Tree.cc.
References emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), i, numTerminalNodes, emtf::Node::setFitValue(), emtf::Node::setSplitValue(), emtf::Node::setSplitVariable(), terminalNodes, and emtf::Node::theMiracleOfChildBirth().
Referenced by loadFromXML().
void Tree::rankVariables | ( | std::vector< Double_t > & | v | ) |
Definition at line 263 of file Tree.cc.
References rankVariablesRecursive(), and rootNode.
void Tree::rankVariablesRecursive | ( | Node * | node, |
std::vector< Double_t > & | v | ||
) |
Definition at line 230 of file Tree.cc.
References emtf::Node::getErrorReduction(), emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), and emtf::Node::getSplitVariable().
Referenced by rankVariables().
void Tree::saveToXML | ( | const char * | filename | ) |
Definition at line 333 of file Tree.cc.
References addXMLAttributes(), emtf::Node::getName(), pyrootRender::root, rootNode, saveToXMLRecursive(), and ExtractAppInfoFromXML::xmldoc.
Referenced by L1TForest::doRegression().
void Tree::saveToXMLRecursive | ( | TXMLEngine * | xml, |
Node * | node, | ||
XMLNodePointer_t | np | ||
) |
Definition at line 359 of file Tree.cc.
References addXMLAttributes(), emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), cmsLHEtoEOSManager::l, and alignCSCRings::r.
Referenced by saveToXML().
void Tree::setRootNode | ( | Node * | sRootNode | ) |
|
private |
Definition at line 56 of file Tree.h.
Referenced by buildTree(), getNumTerminalNodes(), loadFromXMLRecursive(), and Tree().
|
private |
Definition at line 57 of file Tree.h.
Referenced by calcError().
|
private |
Definition at line 54 of file Tree.h.
Referenced by buildTree(), calcError(), filterEvent(), filterEvents(), getRootNode(), getSplitValues(), loadFromXML(), rankVariables(), saveToXML(), setRootNode(), Tree(), and ~Tree().
Definition at line 55 of file Tree.h.
Referenced by buildTree(), calcError(), getTerminalNodes(), loadFromXMLRecursive(), setTerminalNodes(), and Tree().