2 #ifndef EGAMMAOBJECTS_GBRTree 3 #define EGAMMAOBJECTS_GBRTree 33 class DecisionTreeNode;
41 explicit GBRTree(
const TMVA::DecisionTree *
tree,
double scale,
bool useyesnoleaf,
bool adjustboundary);
42 explicit GBRTree(
int nIntermediate,
int nTerminal);
45 double GetResponse(
const float* vector)
const;
46 int TerminalIndex(
const float *vector)
const;
48 std::vector<float> &
Responses() {
return fResponses; }
49 const std::vector<float> &
Responses()
const {
return fResponses; }
51 std::vector<unsigned char> &
CutIndices() {
return fCutIndices; }
52 const std::vector<unsigned char> &
CutIndices()
const {
return fCutIndices; }
54 std::vector<float> &
CutVals() {
return fCutVals; }
55 const std::vector<float> &
CutVals()
const {
return fCutVals; }
58 const std::vector<int> &
LeftIndices()
const {
return fLeftIndices; }
61 const std::vector<int> &
RightIndices()
const {
return fRightIndices; }
66 unsigned int CountIntermediateNodes(
const TMVA::DecisionTreeNode *node);
67 unsigned int CountTerminalNodes(
const TMVA::DecisionTreeNode *node);
69 void AddNode(
const TMVA::DecisionTreeNode *node,
double scale,
bool isregression,
bool useyesnoleaf,
bool adjustboundary);
83 return fResponses[TerminalIndex(vector)];
90 auto r = fRightIndices[
index];
91 auto l = fLeftIndices[
index];
92 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()