|
ATLAS Offline Software
|
Go to the documentation of this file.
43 explicit BDT(std::unique_ptr<IForest> forest):
float GetOffset() const
Get the offset to the whole forest.
float GetResponse() const
unsigned int GetNTrees() const
Number of trees in the whole forest.
std::vector< float > GetValues() const
Return the values corresponding to m_pointers (or an empty vector)
void PrintTree(unsigned int itree) const
BDT(BDT &&)=default
default move ctor, move assignment and dtor
void SetPointers(const std::vector< float * > &pointers)
Set the stored pointers so that one can use methods with no args.
BDT(TTree *tree)
Constructor.
Simplified Boosted Regression Tree, support TMVA, lgbm, and xgboost.
const std::vector< float * > & GetPointers() const
Return stored pointers (which are used by methods with no args)
float GetTreeResponse(const std::vector< float * > &pointers, MVAUtils::index_t index) const
float GetTreeResponse(const std::vector< float > &values, MVAUtils::index_t index) const
for debugging, return the response of a sigle tree given the index of its top node
BDT & operator=(const BDT &)=delete
std::unique_ptr< IForest > m_forest
the implementation of the forest, doing the hard work
float GetResponse(const std::vector< float * > &pointers) const
BDT & operator=(BDT &&)=default
float GetGradBoostMVA(const std::vector< float * > &pointers) const
float GetClassification(const std::vector< float > &values) const
Get response of the forest, for classification.
void PrintForest() const
for debugging, print out tree or forest to stdout
int32_t index_t
The index type of the node in the vector.
std::vector< float > GetMultiResponse(const std::vector< float * > &pointers, unsigned int numClasses) const
std::vector< float * > m_pointers
where vars to cut on can be set (but can also be passed)
TTree * WriteTree(TString name="BDT") const
Return a TTree representing the BDT: each entry is a binary tree, each element of the vectors is a no...
float GetClassification(const std::vector< float * > &pointers) const
float GetGradBoostMVA(const std::vector< float > &values) const
BDT(std::unique_ptr< IForest > forest)
int GetNVars() const
Number of variables expected in the inputs.
std::vector< float > GetMultiResponse(unsigned int numClasses) const
std::vector< T * > pointers(std::vector< T > &v)
float GetResponse(const std::vector< float > &values) const
Get response of the forest, for regression.
float GetClassification() const
std::vector< float > GetMultiResponse(const std::vector< float > &values, unsigned int numClasses) const
Get response of the forest, for multiclassification (e.g.