LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
WeakClassifier class containing a decision tree and a weight. More...
Public Member Functions | |
WeakClassifier (const pandora::TiXmlHandle *const pXmlHandle) | |
Constructor using xml handle to set member variables. More... | |
WeakClassifier (const WeakClassifier &rhs) | |
Copy constructor. More... | |
WeakClassifier & | operator= (const WeakClassifier &rhs) |
Assignment operator. More... | |
~WeakClassifier () | |
Destructor. More... | |
bool | Predict (const LArMvaHelper::MvaFeatureVector &features) const |
Predict signal or background based on trained data. More... | |
bool | EvaluateNode (const int nodeId, const LArMvaHelper::MvaFeatureVector &features) const |
Evalute node and return outcome. More... | |
double | GetWeight () const |
Get boost weight for weak classifier. More... | |
int | GetTreeId () const |
Get tree id for weak classifier. More... | |
Private Attributes | |
IdToNodeMap | m_idToNodeMap |
Decision tree nodes. More... | |
double | m_weight |
Boost weight. More... | |
int | m_treeId |
Decision tree id. More... | |
WeakClassifier class containing a decision tree and a weight.
Definition at line 196 of file LArAdaBoostDecisionTree.h.
lar_content::AdaBoostDecisionTree::WeakClassifier::WeakClassifier | ( | 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::StrongClassifier::operator=(), lar_content::AdaBoostDecisionTree::StrongClassifier::ReadComponent(), lar_content::AdaBoostDecisionTree::StrongClassifier::StrongClassifier(), and lar_content::AdaBoostDecisionTree::Node::~Node().
lar_content::AdaBoostDecisionTree::WeakClassifier::WeakClassifier | ( | const WeakClassifier & | rhs | ) |
Copy constructor.
rhs | the weak classifier to copy |
Definition at line 290 of file LArAdaBoostDecisionTree.cc.
References lar_content::AdaBoostDecisionTree::Node::GetNodeId(), and m_idToNodeMap.
lar_content::AdaBoostDecisionTree::WeakClassifier::~WeakClassifier | ( | ) |
Destructor.
Definition at line 322 of file LArAdaBoostDecisionTree.cc.
References m_idToNodeMap.
bool lar_content::AdaBoostDecisionTree::WeakClassifier::EvaluateNode | ( | const int | nodeId, |
const LArMvaHelper::MvaFeatureVector & | features | ||
) | const |
Evalute node and return outcome.
nodeId | current node id |
features | the input features |
Definition at line 337 of file LArAdaBoostDecisionTree.cc.
References Get, lar_content::AdaBoostDecisionTree::Node::GetLeftChildNodeId(), lar_content::AdaBoostDecisionTree::Node::GetOutcome(), lar_content::AdaBoostDecisionTree::Node::GetRightChildNodeId(), lar_content::AdaBoostDecisionTree::Node::GetThreshold(), lar_content::AdaBoostDecisionTree::Node::GetVariableId(), lar_content::AdaBoostDecisionTree::Node::IsLeaf(), m_idToNodeMap, and lar_content::AdaBoostDecisionTree::StrongClassifier::StrongClassifier().
Referenced by Predict().
|
inline |
Get tree id for weak classifier.
Definition at line 393 of file LArAdaBoostDecisionTree.h.
|
inline |
Get boost weight for weak classifier.
Definition at line 386 of file LArAdaBoostDecisionTree.h.
AdaBoostDecisionTree::WeakClassifier & lar_content::AdaBoostDecisionTree::WeakClassifier::operator= | ( | const WeakClassifier & | rhs | ) |
Assignment operator.
rhs | the weak classifier to assign |
Definition at line 303 of file LArAdaBoostDecisionTree.cc.
References lar_content::AdaBoostDecisionTree::Node::GetNodeId(), m_idToNodeMap, m_treeId, and m_weight.
bool lar_content::AdaBoostDecisionTree::WeakClassifier::Predict | ( | const LArMvaHelper::MvaFeatureVector & | features | ) | const |
Predict signal or background based on trained data.
features | the input features |
Definition at line 330 of file LArAdaBoostDecisionTree.cc.
References EvaluateNode().
|
private |
Decision tree nodes.
Definition at line 259 of file LArAdaBoostDecisionTree.h.
Referenced by EvaluateNode(), operator=(), WeakClassifier(), and ~WeakClassifier().
|
private |
Decision tree id.
Definition at line 261 of file LArAdaBoostDecisionTree.h.
Referenced by operator=().
|
private |