#include <Tree.h>
Public Member Functions | |
void | addXMLAttributes (TXMLEngine *xml, Node *node, XMLNodePointer_t np) |
void | buildTree (Int_t nodeLimit) |
void | calcError () |
void | filterEvents (std::vector< Event * > &tEvents) |
void | filterEventsRecursive (Node *node) |
Int_t | getNumTerminalNodes () |
Node * | getRootNode () |
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 244 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().
void Tree::filterEvents | ( | std::vector< Event * > & | tEvents | ) |
Definition at line 163 of file Tree.cc.
References filterEventsRecursive(), Node::getEvents(), and rootNode.
Referenced by Forest::appendCorrection().
void Tree::filterEventsRecursive | ( | Node * | node | ) |
Definition at line 179 of file Tree.cc.
References Node::filterEventsToDaughters(), Node::getLeftDaughter(), and Node::getRightDaughter().
Referenced by filterEvents().
Int_t Tree::getNumTerminalNodes | ( | ) |
Node * Tree::getRootNode | ( | ) |
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 303 of file Tree.cc.
References loadFromXMLRecursive(), rootNode, and ExtractAppInfoFromXML::xmldoc.
void Tree::loadFromXMLRecursive | ( | TXMLEngine * | xml, |
XMLNodePointer_t | node, | ||
Node * | tnode | ||
) |
Definition at line 329 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 223 of file Tree.cc.
References rankVariablesRecursive(), and rootNode.
void Tree::rankVariablesRecursive | ( | Node * | node, |
std::vector< Double_t > & | v | ||
) |
Definition at line 198 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 255 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 281 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 49 of file Tree.h.
Referenced by buildTree(), getNumTerminalNodes(), loadFromXMLRecursive(), and Tree().
|
private |
Definition at line 50 of file Tree.h.
Referenced by calcError().
|
private |
Definition at line 47 of file Tree.h.
Referenced by buildTree(), calcError(), filterEvents(), getRootNode(), loadFromXML(), rankVariables(), saveToXML(), setRootNode(), Tree(), and ~Tree().
Definition at line 48 of file Tree.h.
Referenced by buildTree(), calcError(), getTerminalNodes(), loadFromXMLRecursive(), setTerminalNodes(), and Tree().