2 #ifndef EGAMMAOBJECTS_GBRTree 3 #define EGAMMAOBJECTS_GBRTree 33 class DecisionTreeNode;
41 explicit GBRTree(
const TMVA::DecisionTree *
tree,
double scale,
bool useyesnoleaf,
bool adjustboundary);
44 double GetResponse(
const float* vector)
const;
45 int TerminalIndex(
const float *vector)
const;
47 std::vector<float> &
Responses() {
return fResponses; }
48 const std::vector<float> &
Responses()
const {
return fResponses; }
50 std::vector<unsigned char> &
CutIndices() {
return fCutIndices; }
51 const std::vector<unsigned char> &
CutIndices()
const {
return fCutIndices; }
53 std::vector<float> &
CutVals() {
return fCutVals; }
54 const std::vector<float> &
CutVals()
const {
return fCutVals; }
57 const std::vector<int> &
LeftIndices()
const {
return fLeftIndices; }
60 const std::vector<int> &
RightIndices()
const {
return fRightIndices; }
65 unsigned int CountIntermediateNodes(
const TMVA::DecisionTreeNode *node);
66 unsigned int CountTerminalNodes(
const TMVA::DecisionTreeNode *node);
68 void AddNode(
const TMVA::DecisionTreeNode *node,
double scale,
bool isregression,
bool useyesnoleaf,
bool adjustboundary);
82 return fResponses[TerminalIndex(vector)];
89 auto r = fRightIndices[
index];
90 auto l = fLeftIndices[
index];
91 index = vector[fCutIndices[
index]] > fCutVals[
index] ?
r :
l;
const std::vector< float > & CutVals() const
std::vector< float > & Responses()
const std::vector< int > & RightIndices() const
const std::vector< int > & LeftIndices() const
std::vector< float > & CutVals()
std::vector< int > fRightIndices
std::vector< float > fResponses
std::vector< int > & LeftIndices()
const std::vector< unsigned char > & CutIndices() const
double GetResponse(const float *vector) const
std::vector< float > fCutVals
std::vector< int > fLeftIndices
#define COND_SERIALIZABLE
const std::vector< float > & Responses() const
int TerminalIndex(const float *vector) const
std::vector< int > & RightIndices()
std::vector< unsigned char > fCutIndices
std::vector< unsigned char > & CutIndices()