LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Node class used for representing a decision tree. More...
Public Member Functions | |
Node (const pandora::TiXmlHandle *const pXmlHandle) | |
Constructor using xml handle to set member variables. More... | |
Node (const Node &rhs) | |
Copy constructor. More... | |
Node & | operator= (const Node &rhs) |
Assignment operator. More... | |
~Node () | |
Destructor. More... | |
int | GetNodeId () const |
Return node id. More... | |
int | GetParentNodeId () const |
Return parent node id. More... | |
int | GetLeftChildNodeId () const |
Return left child node id. More... | |
int | GetRightChildNodeId () const |
Return right child node id. More... | |
bool | IsLeaf () const |
Return is the node a leaf. More... | |
double | GetThreshold () const |
Return node threshold. More... | |
int | GetVariableId () const |
Return cut variable. More... | |
bool | GetOutcome () const |
Return outcome. More... | |
Private Attributes | |
int | m_nodeId |
Node id. More... | |
int | m_parentNodeId |
Parent node id. More... | |
int | m_leftChildNodeId |
Left child node id. More... | |
int | m_rightChildNodeId |
Right child node id. More... | |
bool | m_isLeaf |
Is node a leaf. More... | |
double | m_threshold |
Threshold used for decision if decision node. More... | |
int | m_variableId |
Variable cut on for decision if decision node. More... | |
bool | m_outcome |
Outcome if leaf node. More... | |
Node class used for representing a decision tree.
Definition at line 95 of file LArAdaBoostDecisionTree.h.
lar_content::AdaBoostDecisionTree::Node::Node | ( | const pandora::TiXmlHandle *const | pXmlHandle | ) |
Constructor using xml handle to set member variables.
pXmlHandle | xml handle to use when setting member variables |
Referenced by lar_content::AdaBoostDecisionTree::CalculateScore(), and ~Node().
lar_content::AdaBoostDecisionTree::Node::Node | ( | const Node & | rhs | ) |
Copy constructor.
rhs | the node to copy |
Definition at line 224 of file LArAdaBoostDecisionTree.cc.
lar_content::AdaBoostDecisionTree::Node::~Node | ( | ) |
Destructor.
Definition at line 257 of file LArAdaBoostDecisionTree.cc.
References GetNodeId(), Node(), and lar_content::AdaBoostDecisionTree::WeakClassifier::WeakClassifier().
|
inline |
Return left child node id.
Definition at line 344 of file LArAdaBoostDecisionTree.h.
References m_leftChildNodeId.
Referenced by lar_content::AdaBoostDecisionTree::WeakClassifier::EvaluateNode().
|
inline |
Return node id.
Definition at line 330 of file LArAdaBoostDecisionTree.h.
References m_nodeId.
Referenced by lar_content::AdaBoostDecisionTree::WeakClassifier::operator=(), lar_content::AdaBoostDecisionTree::WeakClassifier::WeakClassifier(), and ~Node().
|
inline |
Return outcome.
Definition at line 379 of file LArAdaBoostDecisionTree.h.
References m_outcome.
Referenced by lar_content::AdaBoostDecisionTree::WeakClassifier::EvaluateNode().
|
inline |
Return parent node id.
Definition at line 337 of file LArAdaBoostDecisionTree.h.
References m_parentNodeId.
|
inline |
Return right child node id.
Definition at line 351 of file LArAdaBoostDecisionTree.h.
References m_rightChildNodeId.
Referenced by lar_content::AdaBoostDecisionTree::WeakClassifier::EvaluateNode().
|
inline |
Return node threshold.
Definition at line 365 of file LArAdaBoostDecisionTree.h.
References m_threshold.
Referenced by lar_content::AdaBoostDecisionTree::WeakClassifier::EvaluateNode().
|
inline |
Return cut variable.
Definition at line 372 of file LArAdaBoostDecisionTree.h.
References m_variableId.
Referenced by lar_content::AdaBoostDecisionTree::WeakClassifier::EvaluateNode().
|
inline |
Return is the node a leaf.
Definition at line 358 of file LArAdaBoostDecisionTree.h.
References m_isLeaf.
Referenced by lar_content::AdaBoostDecisionTree::WeakClassifier::EvaluateNode().
AdaBoostDecisionTree::Node & lar_content::AdaBoostDecisionTree::Node::operator= | ( | const Node & | rhs | ) |
Assignment operator.
rhs | the node to assign |
Definition at line 238 of file LArAdaBoostDecisionTree.cc.
References m_isLeaf, m_leftChildNodeId, m_nodeId, m_outcome, m_parentNodeId, m_rightChildNodeId, m_threshold, and m_variableId.
|
private |
Is node a leaf.
Definition at line 185 of file LArAdaBoostDecisionTree.h.
Referenced by IsLeaf(), and operator=().
|
private |
Left child node id.
Definition at line 183 of file LArAdaBoostDecisionTree.h.
Referenced by GetLeftChildNodeId(), and operator=().
|
private |
Node id.
Definition at line 181 of file LArAdaBoostDecisionTree.h.
Referenced by GetNodeId(), and operator=().
|
private |
Outcome if leaf node.
Definition at line 188 of file LArAdaBoostDecisionTree.h.
Referenced by GetOutcome(), and operator=().
|
private |
Parent node id.
Definition at line 182 of file LArAdaBoostDecisionTree.h.
Referenced by GetParentNodeId(), and operator=().
|
private |
Right child node id.
Definition at line 184 of file LArAdaBoostDecisionTree.h.
Referenced by GetRightChildNodeId(), and operator=().
|
private |
Threshold used for decision if decision node.
Definition at line 186 of file LArAdaBoostDecisionTree.h.
Referenced by GetThreshold(), and operator=().
|
private |
Variable cut on for decision if decision node.
Definition at line 187 of file LArAdaBoostDecisionTree.h.
Referenced by GetVariableId(), and operator=().