ATLAS Offline Software
|
Compute the response from the binary trees in the forest. More...
#include <ForestBase.h>
Public Member Functions | |
virtual float | GetTreeResponse (const std::vector< float > &values, unsigned int itree) const =0 |
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 =0 |
virtual float | GetOffset () const =0 |
Return the global offset. More... | |
virtual float | GetRawResponse (const std::vector< float > &values) const =0 |
Return the response of the whole Forest. More... | |
virtual float | GetRawResponse (const std::vector< float * > &pointers) const =0 |
virtual float | GetClassification (const std::vector< float > &values) const =0 |
Compute the prediction of a classification. More... | |
virtual float | GetClassification (const std::vector< float * > &pointers) const =0 |
virtual float | GetResponse (const std::vector< float > &values) const =0 |
Compute the prediction for regression. More... | |
virtual float | GetResponse (const std::vector< float * > &pointers) const =0 |
virtual std::vector< float > | GetMultiResponse (const std::vector< float > &values, unsigned int numClasses) const =0 |
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 =0 |
virtual unsigned int | GetNTrees () const =0 |
virtual void | PrintForest () const =0 |
virtual void | PrintTree (unsigned int itree) const =0 |
virtual TTree * | WriteTree (TString) const =0 |
Return a TTree representing the BDT. More... | |
virtual int | GetNVars () const =0 |
Get the number of input variable to be passed with std::vector to Get* methods. More... | |
virtual | ~IForest ()=default |
Compute the response from the binary trees in the forest.
Concrete classes should store the trees of the forest with their nodes and be able to compute the response, depending on the implementation. Concrete classes should be constructable from TTree.
Definition at line 22 of file ForestBase.h.
|
virtualdefault |
|
pure virtual |
|
pure virtual |
Compute the prediction of a classification.
Implemented in MVAUtils::ForestTMVA, MVAUtils::ForestXGBoostBase< Node_t >, MVAUtils::ForestXGBoostBase< NodeXGBoost >, MVAUtils::ForestLGBMBase< Node_t >, MVAUtils::ForestLGBMBase< NodeLGBM >, and MVAUtils::ForestLGBMBase< NodeLGBMSimple >.
|
pure virtual |
|
pure virtual |
Compute the prediction for multiclassification (a score for each class).
In addition to the input values need to pass the number of classes
Implemented in MVAUtils::Forest< Node_t >, MVAUtils::Forest< NodeTMVA >, MVAUtils::Forest< NodeLGBM >, MVAUtils::Forest< NodeXGBoost >, and MVAUtils::Forest< NodeLGBMSimple >.
|
pure virtual |
Implemented in MVAUtils::Forest< Node_t >.
|
pure virtual |
Get the number of input variable to be passed with std::vector to Get* methods.
Implemented in MVAUtils::ForestTMVA, MVAUtils::ForestLGBM, MVAUtils::ForestXGBoost, and MVAUtils::ForestLGBMSimple.
|
pure virtual |
Return the global offset.
For many implementation this is just 0
Implemented in MVAUtils::Forest< Node_t >, and MVAUtils::ForestWeighted< Node_t >.
|
pure virtual |
|
pure virtual |
Return the response of the whole Forest.
Raw is just the sum of all the trees
Implemented in MVAUtils::Forest< Node_t >, MVAUtils::Forest< NodeTMVA >, MVAUtils::Forest< NodeLGBM >, MVAUtils::Forest< NodeXGBoost >, and MVAUtils::Forest< NodeLGBMSimple >.
|
pure virtual |
|
pure virtual |
Compute the prediction for regression.
Implemented in MVAUtils::ForestTMVA, MVAUtils::Forest< Node_t >, MVAUtils::Forest< NodeTMVA >, MVAUtils::Forest< NodeLGBM >, MVAUtils::Forest< NodeXGBoost >, and MVAUtils::Forest< NodeLGBMSimple >.
|
pure virtual |
|
pure virtual |
Return the response of one tree Must pass the features in a std::vector<float> values and the index of the tree.
Implemented in MVAUtils::Forest< Node_t >, MVAUtils::Forest< NodeTMVA >, MVAUtils::Forest< NodeLGBM >, MVAUtils::Forest< NodeXGBoost >, and MVAUtils::Forest< NodeLGBMSimple >.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Return a TTree representing the BDT.
The called is the owner of the returned TTree
Implemented in MVAUtils::ForestTMVA, MVAUtils::ForestLGBM, MVAUtils::ForestXGBoost, and MVAUtils::ForestLGBMSimple.