![]() |
ATLAS Offline Software
|
#include <ForestTMVA.h>
Public Member Functions | |
| ForestTMVA (TTree *tree) | |
| ForestTMVA ()=default | |
| ForestTMVA (const ForestTMVA &)=default | |
| ForestTMVA & | operator= (const ForestTMVA &)=default |
| ForestTMVA (ForestTMVA &&)=default | |
| ForestTMVA & | operator= (ForestTMVA &&)=default |
| ~ForestTMVA ()=default | |
| virtual TTree * | WriteTree (TString name) const override |
| Return a TTree representing the BDT. More... | |
| virtual float | GetResponse (const std::vector< float > &values) const override |
| Compute the prediction for regression. More... | |
| virtual float | GetResponse (const std::vector< float * > &pointers) const override |
| virtual float | GetClassification (const std::vector< float > &values) const override |
| Compute the prediction of a classification. More... | |
| virtual float | GetClassification (const std::vector< float * > &pointers) const override |
| virtual void | PrintForest () const override |
| virtual int | GetNVars () const override |
| Get the number of input variable to be passed with std::vector to Get* methods. More... | |
| void | setNVars (const int max_var) |
| float | GetTreeResponseWeighted (const std::vector< float > &values, unsigned int itree) const |
| float | GetTreeResponseWeighted (const std::vector< float * > &pointers, unsigned int itree) const |
| float | GetWeightedResponse (const std::vector< float > &values) const |
| float | GetWeightedResponse (const std::vector< float * > &pointers) const |
| void | newTree (const std::vector< NodeTMVA > &nodes, float weight) |
| float | GetTreeWeight (unsigned int itree) const |
| float | GetSumWeights () const |
| virtual float | GetOffset () const override |
| Return the offset of the forest. More... | |
| virtual float | GetOffset () const =0 |
| Return the global offset. More... | |
| virtual void | PrintTree (unsigned int itree) const override |
| virtual float | GetTreeResponse (const std::vector< float > &values, unsigned int itree) const override final |
| Return the response of one tree Must pass the features in a std::vector<float> values and the index of the tree. More... | |
| virtual float | GetTreeResponse (const std::vector< float * > &pointers, unsigned int itree) const override final |
| virtual float | GetRawResponse (const std::vector< float > &values) const override final |
| Return the response of the whole Forest. More... | |
| virtual float | GetRawResponse (const std::vector< float * > &pointers) const override final |
| virtual std::vector< float > | GetMultiResponse (const std::vector< float > &values, unsigned int numClasses) const override |
| Compute the prediction for multiclassification (a score for each class). More... | |
| virtual std::vector< float > | GetMultiResponse (const std::vector< float * > &pointers, unsigned int numClasses) const override |
| virtual unsigned int | GetNTrees () const override final |
| virtual unsigned int | GetNTrees () const =0 |
| virtual void | PrintForest () const override |
| std::vector< NodeTMVA > | GetTree (unsigned int itree) const |
| Return the vector of nodes for the tree itree. More... | |
Protected Member Functions | |
| void | newTree (const std::vector< NodeTMVA > &nodes) |
| append a new tree (defined by a vector of nodes serialized in preorder) to the forest More... | |
| float | GetTreeResponseFromNode (const std::vector< float > &values, index_t index) const |
| Get the response of a tree. More... | |
| float | GetTreeResponseFromNode (const std::vector< float * > &pointers, index_t index) const |
Private Attributes | |
| int | m_max_var =0 |
| std::vector< float > | m_weights |
| boost weights More... | |
| float | m_sumWeights |
| the sumOfBoostWeights–no need to recompute each call More... | |
| std::vector< index_t > | m_forest |
| indices of the top-level nodes of each tree More... | |
| std::vector< NodeTMVA > | m_nodes |
| where the nodes of the forest are stored More... | |
Definition at line 63 of file ForestTMVA.h.
|
explicit |
Definition at line 12 of file ForestTMVA.cxx.
|
default |
|
default |
|
default |
|
default |
|
overridevirtual |
Implements MVAUtils::IForest.
|
overridevirtual |
Compute the prediction of a classification.
Implements MVAUtils::IForest.
|
overridevirtualinherited |
Implements MVAUtils::IForest.
|
overridevirtualinherited |
Compute the prediction for multiclassification (a score for each class).
In addition to the input values need to pass the number of classes
Implements MVAUtils::IForest.
|
pure virtualinherited |
Implemented in MVAUtils::Forest< Node_t >.
|
inlinefinaloverridevirtualinherited |
|
inlineoverridevirtual |
Get the number of input variable to be passed with std::vector to Get* methods.
Implements MVAUtils::IForest.
Definition at line 81 of file ForestTMVA.h.
|
pure virtualinherited |
Return the global offset.
For many implementation this is just 0
Implemented in MVAUtils::Forest< Node_t >, and MVAUtils::ForestWeighted< Node_t >.
|
inlineoverridevirtualinherited |
Return the offset of the forest.
Since by default there is no offset, return 0
Reimplemented from MVAUtils::Forest< NodeTMVA >.
Definition at line 41 of file ForestTMVA.h.
|
finaloverridevirtualinherited |
Implements MVAUtils::IForest.
|
finaloverridevirtualinherited |
Return the response of the whole Forest.
Raw is just the sum of all the trees
Implements MVAUtils::IForest.
|
overridevirtual |
Reimplemented from MVAUtils::Forest< NodeTMVA >.
|
overridevirtual |
Compute the prediction for regression.
Reimplemented from MVAUtils::Forest< NodeTMVA >.
|
inlineinherited |
Definition at line 39 of file ForestTMVA.h.
|
inherited |
Return the vector of nodes for the tree itree.
|
finaloverridevirtualinherited |
Implements MVAUtils::IForest.
|
finaloverridevirtualinherited |
Return the response of one tree Must pass the features in a std::vector<float> values and the index of the tree.
Implements MVAUtils::IForest.
|
protectedinherited |
|
protectedinherited |
Get the response of a tree.
Instead of specifying the index of the tree (as in GetTreeResponse) the index of the top node of the tree should be specified
|
inherited |
|
inherited |
|
inlineinherited |
Definition at line 38 of file ForestTMVA.h.
|
inherited |
|
inherited |
|
protectedinherited |
append a new tree (defined by a vector of nodes serialized in preorder) to the forest
|
inherited |
|
default |
|
default |
|
overridevirtual |
|
overridevirtualinherited |
|
inlineoverridevirtualinherited |
|
inline |
Definition at line 82 of file ForestTMVA.h.
|
overridevirtual |
Return a TTree representing the BDT.
The called is the owner of the returned TTree
Implements MVAUtils::IForest.
Definition at line 61 of file ForestTMVA.cxx.
|
privateinherited |
|
private |
Definition at line 84 of file ForestTMVA.h.
|
privateinherited |
|
privateinherited |
the sumOfBoostWeights–no need to recompute each call
Definition at line 50 of file ForestTMVA.h.
|
privateinherited |
boost weights
Definition at line 49 of file ForestTMVA.h.
1.8.18