5#ifndef MVAUtils_ForestTMVA_H
6#define MVAUtils_ForestTMVA_H
22 template<
typename Node_t>
37 void newTree(
const std::vector<Node_t>& nodes,
float weight);
43 virtual void PrintTree(
unsigned int itree)
const override {
44 std::cout <<
"weight: " <<
m_weights[itree] << std::endl;
75 virtual TTree*
WriteTree(TString name)
const override;
76 virtual float GetResponse(
const std::vector<float>& values)
const override ;
ForestTMVA(ForestTMVA &&)=default
virtual TTree * WriteTree(TString name) const override
Return a TTree representing the BDT.
virtual float GetClassification(const std::vector< float * > &pointers) const override
void setNVars(const int max_var)
virtual int GetNVars() const override
Get the number of input variable to be passed with std::vector to Get* methods.
ForestTMVA & operator=(ForestTMVA &&)=default
virtual float GetClassification(const std::vector< float > &values) const override
Compute the prediction of a classification.
ForestTMVA & operator=(const ForestTMVA &)=default
virtual float GetResponse(const std::vector< float * > &pointers) const override
virtual void PrintForest() const override
ForestTMVA(const ForestTMVA &)=default
virtual float GetResponse(const std::vector< float > &values) const override
Compute the prediction for regression.
float GetTreeWeight(unsigned int itree) const
float GetSumWeights() const
float GetTreeResponseWeighted(const std::vector< float > &values, unsigned int itree) const
float m_sumWeights
the sumOfBoostWeights–no need to recompute each call
float GetWeightedResponse(const std::vector< float > &values) const
float GetWeightedResponse(const std::vector< float * > &pointers) const
virtual void PrintTree(unsigned int itree) const override
virtual float GetOffset() const override
Return the offset of the forest.
float GetTreeResponseWeighted(const std::vector< float * > &pointers, unsigned int itree) const
void newTree(const std::vector< Node_t > &nodes, float weight)
std::vector< float > m_weights
boost weights
Generic Forest base class.
virtual void PrintTree(unsigned int itree) const override
virtual unsigned int GetNTrees() const override final
Node for TMVA implementation.
std::vector< T * > pointers(std::vector< T > &v)