Definition at line 117 of file DecisionTreeNode.h.
Public Member Functions | |
DecisionTreeNode () | |
constructor of an essentially "empty" node floating in space | |
DecisionTreeNode (const DecisionTreeNode &n, DecisionTreeNode *parent=nullptr) | |
copy constructor of a node. | |
DecisionTreeNode (Node *p, char pos) | |
constructor of a daughter node as a daughter of 'p' | |
virtual | ~DecisionTreeNode () |
destructor | |
virtual void | AddAttributesToNode (void *node) const |
add attribute to xml | |
virtual void | AddContentToNode (std::stringstream &s) const |
adding attributes to tree node (well, was used in BinarySearchTree, and somehow I guess someone programmed it such that we need this in this tree too, although we don't..) | |
void | AddToSumTarget (Float_t t) |
void | AddToSumTarget2 (Float_t t2) |
void | ClearNodeAndAllDaughters () |
clear the nodes (their S/N, Nevents etc), just keep the structure of the tree | |
virtual Node * | CreateNode () const |
Double_t | GetAlpha () const |
Double_t | GetAlphaMinSubtree () const |
Double_t | GetCC () const |
Bool_t | GetCutType (void) const |
return kTRUE: Cuts select signal, kFALSE: Cuts select bkg | |
Float_t | GetCutValue (void) const |
return the cut value applied at this node | |
Double_t | GetFisherCoeff (Int_t ivar) const |
get fisher coefficients | |
virtual DecisionTreeNode * | GetLeft () const |
Float_t | GetNBkgEvents (void) const |
return the sum of the backgr weights in the node | |
Float_t | GetNBkgEvents_unboosted (void) const |
return the sum of unboosted backgr weights in the node | |
Float_t | GetNBkgEvents_unweighted (void) const |
return the sum of unweighted backgr weights in the node | |
Double_t | GetNBValidation () const |
Float_t | GetNEvents (void) const |
return the number of events that entered the node (during training) | |
Float_t | GetNEvents_unboosted (void) const |
return the number of unboosted events that entered the node (during training) | |
Float_t | GetNEvents_unweighted (void) const |
return the number of unweighted events that entered the node (during training) | |
UInt_t | GetNFisherCoeff () const |
Double_t | GetNodeR () const |
Int_t | GetNodeType (void) const |
return node type: 1 signal node, -1 bkg leave, 0 intermediate Node | |
Float_t | GetNSigEvents (void) const |
return the sum of the signal weights in the node | |
Float_t | GetNSigEvents_unboosted (void) const |
return the sum of unboosted signal weights in the node | |
Float_t | GetNSigEvents_unweighted (void) const |
Double_t | GetNSValidation () const |
Int_t | GetNTerminal () const |
virtual DecisionTreeNode * | GetParent () const |
Float_t | GetPurity (void) const |
return S/(S+B) (purity) at this node (from training) | |
Float_t | GetResponse (void) const |
return the response of the node (for regression) | |
virtual DecisionTreeNode * | GetRight () const |
Float_t | GetRMS (void) const |
return the RMS of the response of the node (for regression) | |
Float_t | GetSampleMax (UInt_t ivar) const |
return the maximum of variable ivar from the training sample that pass/end up in this node | |
Float_t | GetSampleMin (UInt_t ivar) const |
return the minimum of variable ivar from the training sample that pass/end up in this node | |
Short_t | GetSelector () const |
return index of variable used for discrimination at this node | |
Float_t | GetSeparationGain (void) const |
return the gain in separation obtained by this nodes selection | |
Float_t | GetSeparationIndex (void) const |
return the separation index AT this node | |
Double_t | GetSubTreeR () const |
Float_t | GetSumTarget () const |
Float_t | GetSumTarget2 () const |
virtual Bool_t | GoesLeft (const Event &) const |
test event if it descends the tree at this node to the left | |
virtual Bool_t | GoesRight (const Event &) const |
test event if it descends the tree at this node to the right | |
void | IncrementNBkgEvents (Float_t b) |
increment the sum of the backgr weights in the node | |
void | IncrementNBkgEvents_unweighted () |
increment the sum of the backgr weights in the node | |
void | IncrementNEvents (Float_t nev) |
void | IncrementNEvents_unweighted () |
increment the number of events that entered the node (during training) | |
void | IncrementNSigEvents (Float_t s) |
increment the sum of the signal weights in the node | |
void | IncrementNSigEvents_unweighted () |
increment the sum of the signal weights in the node | |
virtual TClass * | IsA () const |
Bool_t | IsTerminal () const |
flag indicates whether this node is terminal | |
virtual void | Print (std::ostream &os) const |
print the node | |
void | PrintPrune (std::ostream &os) const |
printout of the node (can be read in with ReadDataRecord) | |
virtual void | PrintRec (std::ostream &os) const |
recursively print the node and its daughters (--> print the 'tree') | |
void | PrintRecPrune (std::ostream &os) const |
recursive printout of the node and its daughters | |
virtual void | ReadAttributes (void *node, UInt_t tmva_Version_Code=262657) |
virtual void | ReadContent (std::stringstream &s) |
reading attributes from tree node (well, was used in BinarySearchTree, and somehow I guess someone programmed it such that we need this in this tree too, although we don't..) | |
virtual Bool_t | ReadDataRecord (std::istream &is, UInt_t tmva_Version_Code=262657) |
Read the data block. | |
void | ResetValidationData () |
temporary stored node values (number of events, etc.) that originate not from the training but from the validation data (used in pruning) | |
void | SetAlpha (Double_t alpha) |
void | SetAlphaMinSubtree (Double_t g) |
void | SetCC (Double_t cc) |
void | SetCutType (Bool_t t) |
set true: if event variable > cutValue ==> signal , false otherwise | |
void | SetCutValue (Float_t c) |
set the cut value applied at this node | |
void | SetFisherCoeff (Int_t ivar, Double_t coeff) |
set fisher coefficients | |
virtual void | SetLeft (Node *l) |
void | SetNBkgEvents (Float_t b) |
set the sum of the backgr weights in the node | |
void | SetNBkgEvents_unboosted (Float_t b) |
set the sum of the unboosted backgr events in the node | |
void | SetNBkgEvents_unweighted (Float_t b) |
set the sum of the unweighted backgr events in the node | |
void | SetNBValidation (Double_t b) |
void | SetNEvents (Float_t nev) |
set the number of events that entered the node (during training) | |
void | SetNEvents_unboosted (Float_t nev) |
set the number of unboosted events that entered the node (during training) | |
void | SetNEvents_unweighted (Float_t nev) |
set the number of unweighted events that entered the node (during training) | |
void | SetNFisherCoeff (Int_t nvars) |
void | SetNodeR (Double_t r) |
void | SetNodeType (Int_t t) |
set node type: 1 signal node, -1 bkg leave, 0 intermediate Node | |
void | SetNSigEvents (Float_t s) |
set the sum of the signal weights in the node | |
void | SetNSigEvents_unboosted (Float_t s) |
set the sum of the unboosted signal events in the node | |
void | SetNSigEvents_unweighted (Float_t s) |
set the sum of the unweighted signal events in the node | |
void | SetNSValidation (Double_t s) |
void | SetNTerminal (Int_t n) |
virtual void | SetParent (Node *p) |
void | SetPurity (void) |
return the S/(S+B) (purity) for the node REM: even if nodes with purity 0.01 are very PURE background nodes, they still get a small value of the purity. | |
void | SetResponse (Float_t r) |
set the response of the node (for regression) | |
virtual void | SetRight (Node *r) |
void | SetRMS (Float_t r) |
set the RMS of the response of the node (for regression) | |
void | SetSampleMax (UInt_t ivar, Float_t xmax) |
set the maximum of variable ivar from the training sample that pass/end up in this node | |
void | SetSampleMin (UInt_t ivar, Float_t xmin) |
set the minimum of variable ivar from the training sample that pass/end up in this node | |
void | SetSelector (Short_t i) |
set index of variable used for discrimination at this node | |
void | SetSeparationGain (Float_t sep) |
set the separation, or information gained BY this nodes selection | |
void | SetSeparationIndex (Float_t sep) |
set the chosen index, measure of "purity" (separation between S and B) AT this node | |
void | SetSubTreeR (Double_t r) |
void | SetSumTarget (Float_t t) |
void | SetSumTarget2 (Float_t t2) |
void | SetTerminal (Bool_t s=kTRUE) |
virtual void | Streamer (TBuffer &) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TMVA::Node | |
Node () | |
Node (const Node &n) | |
copy constructor, make sure you don't just copy the pointer to the node, but that the parents/daughters are initialized to 0 (and set by the copy constructors of the derived classes | |
Node (Node *p, char pos) | |
constructor of a daughter node as a daughter of 'p' | |
virtual | ~Node () |
node destructor | |
void * | AddXMLTo (void *parent) const |
add attributes to XML | |
Int_t | CountMeAndAllDaughters () const |
recursively go through the part of the tree below this node and count all daughters | |
int | GetCount () |
returns the global number of instantiated nodes | |
UInt_t | GetDepth () const |
virtual TMVA::BinaryTree * | GetParentTree () const |
char | GetPos () const |
void | ReadXML (void *node, UInt_t tmva_Version_Code=262657) |
read attributes from XML | |
void | SetDepth (UInt_t d) |
virtual void | SetParentTree (TMVA::BinaryTree *t) |
void | SetPos (char s) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static UInt_t | GetTmvaVersionCode () |
static bool | IsTraining () |
static void | SetIsTraining (bool on) |
static void | SetTmvaVersionCode (UInt_t code) |
Static Public Member Functions inherited from TMVA::Node | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Protected Member Functions | |
static MsgLogger & | Log () |
Protected Attributes | |
Bool_t | fCutType |
true: if event variable > cutValue ==> signal , false otherwise | |
Float_t | fCutValue |
cut value applied on this node to discriminate bkg against sig | |
std::vector< Double_t > | fFisherCoeff |
the fisher coeff (offset at the last element) | |
Bool_t | fIsTerminalNode |
! flag to set node as terminal (i.e., without deleting its descendants) | |
Int_t | fNodeType |
Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal. | |
Float_t | fPurity |
the node purity | |
Float_t | fResponse |
response value in case of regression | |
Float_t | fRMS |
response RMS of the regression node | |
Short_t | fSelector |
index of variable used in node selection (decision tree) | |
DTNodeTrainingInfo * | fTrainInfo |
Protected Attributes inherited from TMVA::Node | |
UInt_t | fDepth |
depth of the node within the tree (seen from root node) | |
Node * | fLeft |
pointers to the two "daughter" nodes | |
Node * | fParent |
the previous (parent) node | |
BinaryTree * | fParentTree |
pointer to the parent tree to which the Node belongs | |
char | fPos |
position, i.e. it is a left (l) or right (r) daughter | |
Node * | fRight |
pointers to the two "daughter" nodes | |
Static Protected Attributes | |
static bool | fgIsTraining = false |
static variable to flag training phase in which we need fTrainInfo | |
static UInt_t | fgTmva_Version_Code = 0 |
set only when read from weightfile | |
#include <TMVA/DecisionTreeNode.h>
TMVA::DecisionTreeNode::DecisionTreeNode | ( | ) |
constructor of an essentially "empty" node floating in space
Definition at line 67 of file DecisionTreeNode.cxx.
TMVA::DecisionTreeNode::DecisionTreeNode | ( | TMVA::Node * | p, |
char | pos | ||
) |
constructor of a daughter node as a daughter of 'p'
Definition at line 91 of file DecisionTreeNode.cxx.
TMVA::DecisionTreeNode::DecisionTreeNode | ( | const DecisionTreeNode & | n, |
DecisionTreeNode * | parent = nullptr |
||
) |
copy constructor of a node.
It will result in an explicit copy of the node and recursively all it's daughters
Definition at line 116 of file DecisionTreeNode.cxx.
|
virtual |
destructor
Definition at line 148 of file DecisionTreeNode.cxx.
|
virtual |
|
virtual |
adding attributes to tree node (well, was used in BinarySearchTree, and somehow I guess someone programmed it such that we need this in this tree too, although we don't..)
Implements TMVA::Node.
Definition at line 526 of file DecisionTreeNode.cxx.
|
inline |
Definition at line 323 of file DecisionTreeNode.h.
|
inline |
Definition at line 324 of file DecisionTreeNode.h.
|
static |
|
inlinestaticconstexpr |
Definition at line 381 of file DecisionTreeNode.h.
void TMVA::DecisionTreeNode::ClearNodeAndAllDaughters | ( | ) |
clear the nodes (their S/N, Nevents etc), just keep the structure of the tree
Definition at line 346 of file DecisionTreeNode.cxx.
|
inlinevirtual |
Implements TMVA::Node.
Definition at line 132 of file DecisionTreeNode.h.
|
inlinestatic |
Definition at line 381 of file DecisionTreeNode.h.
|
inline |
Definition at line 304 of file DecisionTreeNode.h.
|
inline |
Definition at line 308 of file DecisionTreeNode.h.
|
inline |
Definition at line 340 of file DecisionTreeNode.h.
|
inline |
return kTRUE: Cuts select signal, kFALSE: Cuts select bkg
Definition at line 160 of file DecisionTreeNode.h.
|
inline |
return the cut value applied at this node
Definition at line 155 of file DecisionTreeNode.h.
get fisher coefficients
Definition at line 139 of file DecisionTreeNode.h.
|
inlinevirtual |
Reimplemented from TMVA::Node.
Definition at line 283 of file DecisionTreeNode.h.
|
inline |
return the sum of the backgr weights in the node
Definition at line 233 of file DecisionTreeNode.h.
|
inline |
return the sum of unboosted backgr weights in the node
Definition at line 251 of file DecisionTreeNode.h.
|
inline |
return the sum of unweighted backgr weights in the node
Definition at line 242 of file DecisionTreeNode.h.
|
inline |
Definition at line 317 of file DecisionTreeNode.h.
|
inline |
return the number of events that entered the node (during training)
Definition at line 236 of file DecisionTreeNode.h.
|
inline |
return the number of unboosted events that entered the node (during training)
Definition at line 254 of file DecisionTreeNode.h.
|
inline |
return the number of unweighted events that entered the node (during training)
Definition at line 245 of file DecisionTreeNode.h.
|
inline |
Definition at line 135 of file DecisionTreeNode.h.
|
inline |
Definition at line 294 of file DecisionTreeNode.h.
|
inline |
return node type: 1 signal node, -1 bkg leave, 0 intermediate Node
Definition at line 165 of file DecisionTreeNode.h.
|
inline |
return the sum of the signal weights in the node
Definition at line 230 of file DecisionTreeNode.h.
|
inline |
return the sum of unboosted signal weights in the node
Definition at line 248 of file DecisionTreeNode.h.
|
inline |
Definition at line 239 of file DecisionTreeNode.h.
|
inline |
Definition at line 318 of file DecisionTreeNode.h.
|
inline |
Definition at line 312 of file DecisionTreeNode.h.
|
inlinevirtual |
Reimplemented from TMVA::Node.
Definition at line 285 of file DecisionTreeNode.h.
|
inline |
return S/(S+B) (purity) at this node (from training)
Definition at line 168 of file DecisionTreeNode.h.
|
inline |
return the response of the node (for regression)
Definition at line 176 of file DecisionTreeNode.h.
|
inlinevirtual |
Reimplemented from TMVA::Node.
Definition at line 284 of file DecisionTreeNode.h.
|
inline |
return the RMS of the response of the node (for regression)
Definition at line 182 of file DecisionTreeNode.h.
return the maximum of variable ivar from the training sample that pass/end up in this node
Definition at line 424 of file DecisionTreeNode.cxx.
return the minimum of variable ivar from the training sample that pass/end up in this node
Definition at line 413 of file DecisionTreeNode.cxx.
|
inline |
return index of variable used for discrimination at this node
Definition at line 150 of file DecisionTreeNode.h.
|
inline |
return the gain in separation obtained by this nodes selection
Definition at line 266 of file DecisionTreeNode.h.
|
inline |
return the separation index AT this node
Definition at line 260 of file DecisionTreeNode.h.
|
inline |
Definition at line 298 of file DecisionTreeNode.h.
|
inline |
Definition at line 326 of file DecisionTreeNode.h.
|
inline |
Definition at line 327 of file DecisionTreeNode.h.
|
static |
Definition at line 558 of file DecisionTreeNode.cxx.
test event if it descends the tree at this node to the left
Implements TMVA::Node.
Definition at line 179 of file DecisionTreeNode.cxx.
test event if it descends the tree at this node to the right
Implements TMVA::Node.
Definition at line 155 of file DecisionTreeNode.cxx.
|
inline |
increment the sum of the backgr weights in the node
Definition at line 215 of file DecisionTreeNode.h.
|
inline |
increment the sum of the backgr weights in the node
Definition at line 224 of file DecisionTreeNode.h.
|
inline |
Definition at line 218 of file DecisionTreeNode.h.
|
inline |
increment the number of events that entered the node (during training)
Definition at line 227 of file DecisionTreeNode.h.
|
inline |
increment the sum of the signal weights in the node
Definition at line 212 of file DecisionTreeNode.h.
|
inline |
increment the sum of the signal weights in the node
Definition at line 221 of file DecisionTreeNode.h.
|
inlinevirtual |
Reimplemented from TMVA::Node.
Definition at line 381 of file DecisionTreeNode.h.
|
inline |
flag indicates whether this node is terminal
Definition at line 334 of file DecisionTreeNode.h.
|
static |
Definition at line 554 of file DecisionTreeNode.cxx.
|
staticprotected |
Definition at line 540 of file DecisionTreeNode.cxx.
|
virtual |
void TMVA::DecisionTreeNode::PrintPrune | ( | std::ostream & | os | ) | const |
printout of the node (can be read in with ReadDataRecord)
Definition at line 381 of file DecisionTreeNode.cxx.
|
virtual |
recursively print the node and its daughters (--> print the 'tree')
Implements TMVA::Node.
Definition at line 241 of file DecisionTreeNode.cxx.
void TMVA::DecisionTreeNode::PrintRecPrune | ( | std::ostream & | os | ) | const |
recursive printout of the node and its daughters
Definition at line 393 of file DecisionTreeNode.cxx.
|
virtual |
Implements TMVA::Node.
Definition at line 455 of file DecisionTreeNode.cxx.
|
virtual |
reading attributes from tree node (well, was used in BinarySearchTree, and somehow I guess someone programmed it such that we need this in this tree too, although we don't..)
Implements TMVA::Node.
Definition at line 535 of file DecisionTreeNode.cxx.
void TMVA::DecisionTreeNode::ResetValidationData | ( | ) |
temporary stored node values (number of events, etc.) that originate not from the training but from the validation data (used in pruning)
Definition at line 366 of file DecisionTreeNode.cxx.
|
inline |
Definition at line 303 of file DecisionTreeNode.h.
|
inline |
Definition at line 307 of file DecisionTreeNode.h.
void TMVA::DecisionTreeNode::SetCC | ( | Double_t | cc | ) |
Definition at line 403 of file DecisionTreeNode.cxx.
|
inline |
set true: if event variable > cutValue ==> signal , false otherwise
Definition at line 158 of file DecisionTreeNode.h.
|
inline |
set the cut value applied at this node
Definition at line 153 of file DecisionTreeNode.h.
set fisher coefficients
Definition at line 515 of file DecisionTreeNode.cxx.
|
static |
Definition at line 546 of file DecisionTreeNode.cxx.
|
inlinevirtual |
Reimplemented from TMVA::Node.
Definition at line 288 of file DecisionTreeNode.h.
|
inline |
set the sum of the backgr weights in the node
Definition at line 188 of file DecisionTreeNode.h.
|
inline |
set the sum of the unboosted backgr events in the node
Definition at line 206 of file DecisionTreeNode.h.
|
inline |
set the sum of the unweighted backgr events in the node
Definition at line 197 of file DecisionTreeNode.h.
|
inline |
Definition at line 315 of file DecisionTreeNode.h.
|
inline |
set the number of events that entered the node (during training)
Definition at line 191 of file DecisionTreeNode.h.
|
inline |
set the number of unboosted events that entered the node (during training)
Definition at line 209 of file DecisionTreeNode.h.
|
inline |
set the number of unweighted events that entered the node (during training)
Definition at line 200 of file DecisionTreeNode.h.
|
inline |
Definition at line 134 of file DecisionTreeNode.h.
|
inline |
Definition at line 293 of file DecisionTreeNode.h.
|
inline |
set node type: 1 signal node, -1 bkg leave, 0 intermediate Node
Definition at line 163 of file DecisionTreeNode.h.
|
inline |
set the sum of the signal weights in the node
Definition at line 185 of file DecisionTreeNode.h.
|
inline |
set the sum of the unboosted signal events in the node
Definition at line 203 of file DecisionTreeNode.h.
|
inline |
set the sum of the unweighted signal events in the node
Definition at line 194 of file DecisionTreeNode.h.
|
inline |
Definition at line 316 of file DecisionTreeNode.h.
|
inline |
Definition at line 311 of file DecisionTreeNode.h.
|
inlinevirtual |
Reimplemented from TMVA::Node.
Definition at line 290 of file DecisionTreeNode.h.
void TMVA::DecisionTreeNode::SetPurity | ( | void | ) |
return the S/(S+B) (purity) for the node REM: even if nodes with purity 0.01 are very PURE background nodes, they still get a small value of the purity.
Definition at line 191 of file DecisionTreeNode.cxx.
|
inline |
set the response of the node (for regression)
Definition at line 173 of file DecisionTreeNode.h.
|
inlinevirtual |
Reimplemented from TMVA::Node.
Definition at line 289 of file DecisionTreeNode.h.
|
inline |
set the RMS of the response of the node (for regression)
Definition at line 179 of file DecisionTreeNode.h.
set the maximum of variable ivar from the training sample that pass/end up in this node
Definition at line 446 of file DecisionTreeNode.cxx.
set the minimum of variable ivar from the training sample that pass/end up in this node
Definition at line 435 of file DecisionTreeNode.cxx.
|
inline |
set index of variable used for discrimination at this node
Definition at line 148 of file DecisionTreeNode.h.
|
inline |
set the separation, or information gained BY this nodes selection
Definition at line 263 of file DecisionTreeNode.h.
|
inline |
set the chosen index, measure of "purity" (separation between S and B) AT this node
Definition at line 257 of file DecisionTreeNode.h.
|
inline |
Definition at line 297 of file DecisionTreeNode.h.
|
inline |
Definition at line 320 of file DecisionTreeNode.h.
|
inline |
Definition at line 321 of file DecisionTreeNode.h.
Definition at line 335 of file DecisionTreeNode.h.
|
static |
Definition at line 550 of file DecisionTreeNode.cxx.
|
virtual |
Reimplemented from TMVA::Node.
|
inline |
Definition at line 381 of file DecisionTreeNode.h.
|
protected |
true: if event variable > cutValue ==> signal , false otherwise
Definition at line 367 of file DecisionTreeNode.h.
|
protected |
cut value applied on this node to discriminate bkg against sig
Definition at line 366 of file DecisionTreeNode.h.
|
protected |
the fisher coeff (offset at the last element)
Definition at line 364 of file DecisionTreeNode.h.
|
staticprotected |
static variable to flag training phase in which we need fTrainInfo
Definition at line 361 of file DecisionTreeNode.h.
|
staticprotected |
set only when read from weightfile
Definition at line 362 of file DecisionTreeNode.h.
|
protected |
! flag to set node as terminal (i.e., without deleting its descendants)
Definition at line 375 of file DecisionTreeNode.h.
|
protected |
Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal.
Definition at line 372 of file DecisionTreeNode.h.
|
protected |
the node purity
Definition at line 373 of file DecisionTreeNode.h.
|
protected |
response value in case of regression
Definition at line 370 of file DecisionTreeNode.h.
|
protected |
response RMS of the regression node
Definition at line 371 of file DecisionTreeNode.h.
|
protected |
index of variable used in node selection (decision tree)
Definition at line 368 of file DecisionTreeNode.h.
|
mutableprotected |
Definition at line 377 of file DecisionTreeNode.h.