44 explicit BDT(std::unique_ptr<IForest> forest):
82 std::vector<float>
GetMultiResponse(
const std::vector<float>& values,
unsigned int numClasses)
const;
96 TTree*
WriteTree(TString name =
"BDT")
const;
100 void PrintTree(
unsigned int itree)
const;
BDT(std::unique_ptr< IForest > forest)
float GetResponse(const std::vector< float * > &pointers) const
BDT(TTree *tree)
Constructor.
float GetClassification(const std::vector< float * > &pointers) const
int GetNVars() const
Number of variables expected in the inputs.
void SetPointers(const std::vector< float * > &pointers)
Set the stored pointers so that one can use methods with no args.
const std::vector< float * > & GetPointers() const
Return stored pointers (which are used by methods with no args)
std::vector< float > GetValues() const
Return the values corresponding to m_pointers (or an empty vector)
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
std::vector< float > GetMultiResponse(const std::vector< float > &values, unsigned int numClasses) const
Get response of the forest, for multiclassification (e.g.
float GetTreeResponse(const std::vector< float * > &pointers, MVAUtils::index_t index) const
BDT(BDT &&)=default
default move ctor, move assignment and dtor
float GetGradBoostMVA(const std::vector< float * > &pointers) const
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...
std::vector< float > GetMultiResponse(const std::vector< float * > &pointers, unsigned int numClasses) const
float GetOffset() const
Get the offset to the whole forest.
std::unique_ptr< IForest > m_forest
the implementation of the forest, doing the hard work
void PrintTree(unsigned int itree) const
unsigned int GetNTrees() const
Number of trees in the whole forest.
float GetClassification(const std::vector< float > &values) const
Get response of the forest, for classification.
BDT & operator=(BDT &&)=default
float GetResponse(const std::vector< float > &values) const
Get response of the forest, for regression.
std::vector< float * > m_pointers
where vars to cut on can be set (but can also be passed)
float GetResponse() const
std::vector< float > GetMultiResponse(unsigned int numClasses) const
BDT & operator=(const BDT &)=delete
void PrintForest() const
for debugging, print out tree or forest to stdout
float GetClassification() const
float GetGradBoostMVA(const std::vector< float > &values) const
int32_t index_t
The index type of the node in the vector.
std::vector< T * > pointers(std::vector< T > &v)