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