#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 34 of file Tree.cc.
References numTerminalNodes, rootNode, Node::setEvents(), and terminalNodes.
Tree::~Tree | ( | ) |
void Tree::addXMLAttributes | ( | TXMLEngine * | xml, |
Node * | node, | ||
XMLNodePointer_t | np | ||
) |
Definition at line 321 of file Tree.cc.
References Node::getFitValue(), Node::getSplitValue(), Node::getSplitVariable(), and numToStr().
Referenced by saveToXML(), and saveToXMLRecursive().
void Tree::buildTree | ( | Int_t | nodeLimit | ) |
Definition at line 107 of file Tree.cc.
References calcError(), Node::calcOptimumSplit(), Node::filterEventsToDaughters(), Node::getLeftDaughter(), Node::getRightDaughter(), numTerminalNodes, rootNode, terminalNodes, and Node::theMiracleOfChildBirth().
Referenced by Forest::doRegression().
void Tree::calcError | ( | ) |
Definition at line 91 of file Tree.cc.
References Node::getNumEvents(), rmsError, rootNode, mathSSE::sqrt(), and terminalNodes.
Referenced by buildTree().
Definition at line 202 of file Tree.cc.
References filterEventRecursive(), and rootNode.
Referenced by Forest::appendCorrection().
Definition at line 214 of file Tree.cc.
References Node::filterEventToDaughter().
Referenced by filterEvent().
void Tree::filterEvents | ( | std::vector< Event * > & | tEvents | ) |
Definition at line 168 of file Tree.cc.
References filterEventsRecursive(), Node::getEvents(), and rootNode.
Referenced by Forest::appendCorrection().
void Tree::filterEventsRecursive | ( | Node * | node | ) |
Definition at line 184 of file Tree.cc.
References Node::filterEventsToDaughters(), Node::getLeftDaughter(), and 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 300 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 270 of file Tree.cc.
References gather_cfg::cout, Node::getLeftDaughter(), Node::getRightDaughter(), Node::getSplitValue(), Node::getSplitVariable(), and findQualityFiles::v.
Referenced by getSplitValues().
Definition at line 75 of file Tree.cc.
References terminalNodes.
Referenced by Forest::updateEvents(), and Forest::updateRegTargets().
void Tree::loadFromXML | ( | const char * | filename | ) |
Definition at line 380 of file Tree.cc.
References loadFromXMLRecursive(), rootNode, and ExtractAppInfoFromXML::xmldoc.
void Tree::loadFromXMLRecursive | ( | TXMLEngine * | xml, |
XMLNodePointer_t | node, | ||
Node * | tnode | ||
) |
Definition at line 406 of file Tree.cc.
References Node::getLeftDaughter(), Node::getRightDaughter(), i, numTerminalNodes, Node::setFitValue(), Node::setSplitValue(), Node::setSplitVariable(), terminalNodes, and Node::theMiracleOfChildBirth().
Referenced by loadFromXML().
void Tree::rankVariables | ( | std::vector< Double_t > & | v | ) |
Definition at line 262 of file Tree.cc.
References rankVariablesRecursive(), and rootNode.
void Tree::rankVariablesRecursive | ( | Node * | node, |
std::vector< Double_t > & | v | ||
) |
Definition at line 229 of file Tree.cc.
References Node::getErrorReduction(), Node::getLeftDaughter(), Node::getRightDaughter(), and Node::getSplitVariable().
Referenced by rankVariables().
void Tree::saveToXML | ( | const char * | filename | ) |
Definition at line 332 of file Tree.cc.
References addXMLAttributes(), Node::getName(), pyrootRender::root, rootNode, saveToXMLRecursive(), and ExtractAppInfoFromXML::xmldoc.
Referenced by Forest::doRegression().
void Tree::saveToXMLRecursive | ( | TXMLEngine * | xml, |
Node * | node, | ||
XMLNodePointer_t | np | ||
) |
Definition at line 358 of file Tree.cc.
References addXMLAttributes(), Node::getLeftDaughter(), Node::getRightDaughter(), cmsLHEtoEOSManager::l, and alignCSCRings::r.
Referenced by saveToXML().
void Tree::setRootNode | ( | Node * | sRootNode | ) |
|
private |
Definition at line 55 of file Tree.h.
Referenced by buildTree(), getNumTerminalNodes(), loadFromXMLRecursive(), and Tree().
|
private |
Definition at line 56 of file Tree.h.
Referenced by calcError().
|
private |
Definition at line 53 of file Tree.h.
Referenced by buildTree(), calcError(), filterEvent(), filterEvents(), getRootNode(), getSplitValues(), loadFromXML(), rankVariables(), saveToXML(), setRootNode(), Tree(), and ~Tree().
Definition at line 54 of file Tree.h.
Referenced by buildTree(), calcError(), getTerminalNodes(), loadFromXMLRecursive(), setTerminalNodes(), and Tree().