Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TMVA::DecisionTreeNode Class Reference

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
void AddAttributesToNode (void *node) const override
 add attribute to xml
void AddContentToNode (std::stringstream &s) const override
 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)
 add to sum target, if traininfo defined
void AddToSumTarget2 (Float_t t2)
 add to sum target 2, if traininfo defined
void * AddXMLTo (void *parent) const
 add attributes to XML
void ClearNodeAndAllDaughters ()
 clear the nodes (their S/N, Nevents etc), just keep the structure of the tree
Int_t CountMeAndAllDaughters () const
 recursively go through the part of the tree below this node and count all daughters
NodeCreateNode () const override
Double_t GetAlpha () const
 return the critical point alpha, or -1 if traininfo undefined
Double_t GetAlphaMinSubtree () const
 return the minimum alpha in the tree rooted at this node, or -1 if traininfo undefined
Double_t GetCC () const
 return CC, or -1 if traininfo undefined
int GetCount ()
 returns the global number of instantiated nodes
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
UInt_t GetDepth () const
Double_t GetFisherCoeff (Int_t ivar) const
 get fisher coefficients
DecisionTreeNodeGetLeft () const override
Float_t GetNBkgEvents (void) const
 return the sum of the backgr weights in the node, or -1 if traininfo undefined
Float_t GetNBkgEvents_unboosted (void) const
 return the sum of unboosted backgr weights in the node, or -1 if traininfo undefined
Float_t GetNBkgEvents_unweighted (void) const
 return the sum of unweighted backgr weights in the node, or -1 if traininfo undefined
Double_t GetNBValidation () const
 return number of background events from the pruning validation sample, or -1 if traininfo undefined
Float_t GetNEvents (void) const
 return the number of events that entered the node (during training), or -1 if traininfo undefined
Float_t GetNEvents_unboosted (void) const
 return the number of unboosted events that entered the node (during training), or -1 if traininfo undefined
Float_t GetNEvents_unweighted (void) const
 return the number of unweighted events that entered the node (during training), or -1 if traininfo undefined
UInt_t GetNFisherCoeff () const
Double_t GetNodeR () const
 return the node resubstitution estimate, R(t), for Cost Complexity pruning, or -1 if traininfo undefined
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, or -1 if traininfo undefined
Float_t GetNSigEvents_unboosted (void) const
 return the sum of unboosted signal weights in the node, or -1 if traininfo undefined
Float_t GetNSigEvents_unweighted (void) const
Double_t GetNSValidation () const
 return number of signal events from the pruning validation sample, or -1 if traininfo undefined
Int_t GetNTerminal () const
 return number of terminal nodes in the subtree rooted here, or -1 if traininfo undefined
DecisionTreeNodeGetParent () const override
virtual TMVA::BinaryTreeGetParentTree () const
char GetPos () 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)
DecisionTreeNodeGetRight () const override
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, if traininfo defined, otherwise Log Fatal and return 9999
Float_t GetSampleMin (UInt_t ivar) const
 return the minimum of variable ivar from the training sample that pass/end up in this node, if traininfo defined, otherwise Log Fatal and return -9999
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 node's selection, or -1 if traininfo undefined
Float_t GetSeparationIndex (void) const
 return the separation index AT this node, or 0 if traininfo undefined
Double_t GetSubTreeR () const
 return the resubstitution estimate, R(T_t), of the tree rooted at this node, or -1 if traininfo undefined
Float_t GetSumTarget () const
 return sum target, or -9999 if traininfo undefined
Float_t GetSumTarget2 () const
 return sum target 2, or -9999 if traininfo undefined
Bool_t GoesLeft (const Event &) const override
 test event if it descends the tree at this node to the left
Bool_t GoesRight (const Event &) const override
 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, if traininfo defined
void IncrementNBkgEvents_unweighted ()
 increment the sum of the backgr weights in the node, if traininfo defined
void IncrementNEvents (Float_t nev)
void IncrementNEvents_unweighted ()
 increment the number of events that entered the node (during training), if traininfo defined
void IncrementNSigEvents (Float_t s)
 increment the sum of the signal weights in the node, if traininfo defined
void IncrementNSigEvents_unweighted ()
 increment the sum of the signal weights in the node, if traininfo defined
TClassIsA () const override
Bool_t IsTerminal () const
 flag indicates whether this node is terminal
void Print (std::ostream &os) const override
 print the node
void PrintPrune (std::ostream &os) const
 printout of the node (can be read in with ReadDataRecord)
void PrintRec (std::ostream &os) const override
 recursively print the node and its daughters (--> print the 'tree')
void PrintRecPrune (std::ostream &os) const
 recursive printout of the node and its daughters
void ReadAttributes (void *node, UInt_t tmva_Version_Code=262657) override
void ReadContent (std::stringstream &s) override
 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..)
Bool_t ReadDataRecord (std::istream &is, UInt_t tmva_Version_Code=262657) override
 Read the data block.
void ReadXML (void *node, UInt_t tmva_Version_Code=262657)
 read attributes from XML
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)
 set the critical point alpha, if traininfo defined
void SetAlphaMinSubtree (Double_t g)
 set the minimum alpha in the tree rooted at this node, if traininfo defined
void SetCC (Double_t cc)
 Set CC, if traininfo defined, otherwise Log Fatal.
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 SetDepth (UInt_t d)
void SetFisherCoeff (Int_t ivar, Double_t coeff)
 set fisher coefficients
void SetLeft (Node *l) override
void SetNBkgEvents (Float_t b)
 set the sum of the backgr weights in the node, if traininfo defined
void SetNBkgEvents_unboosted (Float_t b)
 set the sum of the unboosted backgr events in the node, if traininfo defined
void SetNBkgEvents_unweighted (Float_t b)
 set the sum of the unweighted backgr events in the node, if traininfo defined
void SetNBValidation (Double_t b)
 set number of background events from the pruning validation sample, if traininfo defined
void SetNEvents (Float_t nev)
 set the number of events that entered the node (during training), if traininfo defined
void SetNEvents_unboosted (Float_t nev)
 set the number of unboosted events that entered the node (during training), if traininfo defined
void SetNEvents_unweighted (Float_t nev)
 set the number of unweighted events that entered the node (during training), if traininfo defined
void SetNFisherCoeff (Int_t nvars)
void SetNodeR (Double_t r)
 set the node resubstitution estimate, R(t), for Cost Complexity pruning, if traininfo defined
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, if traininfo defined
void SetNSigEvents_unboosted (Float_t s)
 set the sum of the unboosted signal events in the node, if traininfo defined
void SetNSigEvents_unweighted (Float_t s)
 set the sum of the unweighted signal events in the node, if traininfo defined
void SetNSValidation (Double_t s)
 set number of signal events from the pruning validation sample, if traininfo defined
void SetNTerminal (Int_t n)
 set number of terminal nodes in the subtree rooted here, if traininfo defined
void SetParent (Node *p) override
virtual void SetParentTree (TMVA::BinaryTree *t)
void SetPos (char s)
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)
void SetRight (Node *r) override
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, if traininfo defined
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, if traininfo defined
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 node's selection, if traininfo defined
void SetSeparationIndex (Float_t sep)
 set the chosen index, measure of "purity" (separation between S and B) AT this node, if traininfo defined
void SetSubTreeR (Double_t r)
 set the resubstitution estimate, R(T_t), of the tree rooted at this node, if traininfo defined
void SetSumTarget (Float_t t)
 set sum target, if traininfo defined
void SetSumTarget2 (Float_t t2)
 set sum target 2, if traininfo defined
void SetTerminal (Bool_t s=kTRUE)
void Streamer (TBuffer &) override
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)

Static Public Member Functions

static TClassClass ()
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 Protected Member Functions

static MsgLoggerLog ()

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
UInt_t fDepth
 depth of the node within the tree (seen from root node)
std::vector< Double_tfFisherCoeff
 the fisher coeff (offset at the last element)
Bool_t fIsTerminalNode
 ! flag to set node as terminal (i.e., without deleting its descendants)
NodefLeft
 pointers to the two "daughter" nodes
Int_t fNodeType
 Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal.
NodefParent
 the previous (parent) node
BinaryTreefParentTree
 pointer to the parent tree to which the Node belongs
char fPos
 position, i.e. it is a left (l) or right (r) daughter
Float_t fPurity
 the node purity
Float_t fResponse
 response value in case of regression
NodefRight
 pointers to the two "daughter" nodes
Float_t fRMS
 response RMS of the regression node
Short_t fSelector
 index of variable used in node selection (decision tree)
DTNodeTrainingInfofTrainInfo

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

Static Private Attributes

static Int_t fgCount = 0
 counter of all nodes present.. for debug.. to spot memory leaks...

#include <TMVA/DecisionTreeNode.h>

Inheritance diagram for TMVA::DecisionTreeNode:
TMVA::Node

Constructor & Destructor Documentation

◆ DecisionTreeNode() [1/3]

TMVA::DecisionTreeNode::DecisionTreeNode ( )

constructor of an essentially "empty" node floating in space

Definition at line 66 of file DecisionTreeNode.cxx.

◆ DecisionTreeNode() [2/3]

TMVA::DecisionTreeNode::DecisionTreeNode ( TMVA::Node * p,
char pos )

constructor of a daughter node as a daughter of 'p'

Definition at line 90 of file DecisionTreeNode.cxx.

◆ DecisionTreeNode() [3/3]

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 115 of file DecisionTreeNode.cxx.

◆ ~DecisionTreeNode()

TMVA::DecisionTreeNode::~DecisionTreeNode ( )
virtual

destructor

Definition at line 147 of file DecisionTreeNode.cxx.

Member Function Documentation

◆ AddAttributesToNode()

void TMVA::DecisionTreeNode::AddAttributesToNode ( void * node) const
overridevirtual

add attribute to xml

Implements TMVA::Node.

Definition at line 494 of file DecisionTreeNode.cxx.

◆ AddContentToNode()

void TMVA::DecisionTreeNode::AddContentToNode ( std::stringstream & s) const
overridevirtual

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 528 of file DecisionTreeNode.cxx.

◆ AddToSumTarget()

void TMVA::DecisionTreeNode::AddToSumTarget ( Float_t t)
inline

add to sum target, if traininfo defined

Definition at line 335 of file DecisionTreeNode.h.

◆ AddToSumTarget2()

void TMVA::DecisionTreeNode::AddToSumTarget2 ( Float_t t2)
inline

add to sum target 2, if traininfo defined

Definition at line 337 of file DecisionTreeNode.h.

◆ AddXMLTo()

void * TMVA::Node::AddXMLTo ( void * parent) const
inherited

add attributes to XML

Definition at line 146 of file Node.cxx.

◆ Class()

TClass * TMVA::DecisionTreeNode::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

const char * TMVA::DecisionTreeNode::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

constexpr Version_t TMVA::DecisionTreeNode::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 397 of file DecisionTreeNode.h.

◆ ClearNodeAndAllDaughters()

void TMVA::DecisionTreeNode::ClearNodeAndAllDaughters ( )

clear the nodes (their S/N, Nevents etc), just keep the structure of the tree

Definition at line 345 of file DecisionTreeNode.cxx.

◆ CountMeAndAllDaughters()

Int_t TMVA::Node::CountMeAndAllDaughters ( ) const
inherited

recursively go through the part of the tree below this node and count all daughters

Definition at line 113 of file Node.cxx.

◆ CreateNode()

Node * TMVA::DecisionTreeNode::CreateNode ( ) const
inlineoverridevirtual

Implements TMVA::Node.

Definition at line 132 of file DecisionTreeNode.h.

◆ DeclFileName()

const char * TMVA::DecisionTreeNode::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 397 of file DecisionTreeNode.h.

◆ GetAlpha()

Double_t TMVA::DecisionTreeNode::GetAlpha ( ) const
inline

return the critical point alpha, or -1 if traininfo undefined

Definition at line 308 of file DecisionTreeNode.h.

◆ GetAlphaMinSubtree()

Double_t TMVA::DecisionTreeNode::GetAlphaMinSubtree ( ) const
inline

return the minimum alpha in the tree rooted at this node, or -1 if traininfo undefined

Definition at line 313 of file DecisionTreeNode.h.

◆ GetCC()

Double_t TMVA::DecisionTreeNode::GetCC ( ) const
inline

return CC, or -1 if traininfo undefined

Definition at line 356 of file DecisionTreeNode.h.

◆ GetCount()

int TMVA::Node::GetCount ( )
inherited

returns the global number of instantiated nodes

Definition at line 105 of file Node.cxx.

◆ GetCutType()

Bool_t TMVA::DecisionTreeNode::GetCutType ( void ) const
inline

return kTRUE: Cuts select signal, kFALSE: Cuts select bkg

Definition at line 160 of file DecisionTreeNode.h.

◆ GetCutValue()

Float_t TMVA::DecisionTreeNode::GetCutValue ( void ) const
inline

return the cut value applied at this node

Definition at line 155 of file DecisionTreeNode.h.

◆ GetDepth()

UInt_t TMVA::Node::GetDepth ( ) const
inlineinherited

Definition at line 116 of file Node.h.

◆ GetFisherCoeff()

Double_t TMVA::DecisionTreeNode::GetFisherCoeff ( Int_t ivar) const
inline

get fisher coefficients

Definition at line 139 of file DecisionTreeNode.h.

◆ GetLeft()

DecisionTreeNode * TMVA::DecisionTreeNode::GetLeft ( ) const
inlineoverridevirtual

Reimplemented from TMVA::Node.

Definition at line 283 of file DecisionTreeNode.h.

◆ GetNBkgEvents()

Float_t TMVA::DecisionTreeNode::GetNBkgEvents ( void ) const
inline

return the sum of the backgr weights in the node, or -1 if traininfo undefined

Definition at line 233 of file DecisionTreeNode.h.

◆ GetNBkgEvents_unboosted()

Float_t TMVA::DecisionTreeNode::GetNBkgEvents_unboosted ( void ) const
inline

return the sum of unboosted backgr weights in the node, or -1 if traininfo undefined

Definition at line 251 of file DecisionTreeNode.h.

◆ GetNBkgEvents_unweighted()

Float_t TMVA::DecisionTreeNode::GetNBkgEvents_unweighted ( void ) const
inline

return the sum of unweighted backgr weights in the node, or -1 if traininfo undefined

Definition at line 242 of file DecisionTreeNode.h.

◆ GetNBValidation()

Double_t TMVA::DecisionTreeNode::GetNBValidation ( ) const
inline

return number of background events from the pruning validation sample, or -1 if traininfo undefined

Definition at line 325 of file DecisionTreeNode.h.

◆ GetNEvents()

Float_t TMVA::DecisionTreeNode::GetNEvents ( void ) const
inline

return the number of events that entered the node (during training), or -1 if traininfo undefined

Definition at line 236 of file DecisionTreeNode.h.

◆ GetNEvents_unboosted()

Float_t TMVA::DecisionTreeNode::GetNEvents_unboosted ( void ) const
inline

return the number of unboosted events that entered the node (during training), or -1 if traininfo undefined

Definition at line 254 of file DecisionTreeNode.h.

◆ GetNEvents_unweighted()

Float_t TMVA::DecisionTreeNode::GetNEvents_unweighted ( void ) const
inline

return the number of unweighted events that entered the node (during training), or -1 if traininfo undefined

Definition at line 245 of file DecisionTreeNode.h.

◆ GetNFisherCoeff()

UInt_t TMVA::DecisionTreeNode::GetNFisherCoeff ( ) const
inline

Definition at line 135 of file DecisionTreeNode.h.

◆ GetNodeR()

Double_t TMVA::DecisionTreeNode::GetNodeR ( ) const
inline

return the node resubstitution estimate, R(t), for Cost Complexity pruning, or -1 if traininfo undefined

Definition at line 295 of file DecisionTreeNode.h.

◆ GetNodeType()

Int_t TMVA::DecisionTreeNode::GetNodeType ( void ) const
inline

return node type: 1 signal node, -1 bkg leave, 0 intermediate Node

Definition at line 165 of file DecisionTreeNode.h.

◆ GetNSigEvents()

Float_t TMVA::DecisionTreeNode::GetNSigEvents ( void ) const
inline

return the sum of the signal weights in the node, or -1 if traininfo undefined

Definition at line 230 of file DecisionTreeNode.h.

◆ GetNSigEvents_unboosted()

Float_t TMVA::DecisionTreeNode::GetNSigEvents_unboosted ( void ) const
inline

return the sum of unboosted signal weights in the node, or -1 if traininfo undefined

Definition at line 248 of file DecisionTreeNode.h.

◆ GetNSigEvents_unweighted()

Float_t TMVA::DecisionTreeNode::GetNSigEvents_unweighted ( void ) const
inline

Definition at line 239 of file DecisionTreeNode.h.

◆ GetNSValidation()

Double_t TMVA::DecisionTreeNode::GetNSValidation ( ) const
inline

return number of signal events from the pruning validation sample, or -1 if traininfo undefined

Definition at line 327 of file DecisionTreeNode.h.

◆ GetNTerminal()

Int_t TMVA::DecisionTreeNode::GetNTerminal ( ) const
inline

return number of terminal nodes in the subtree rooted here, or -1 if traininfo undefined

Definition at line 318 of file DecisionTreeNode.h.

◆ GetParent()

DecisionTreeNode * TMVA::DecisionTreeNode::GetParent ( ) const
inlineoverridevirtual

Reimplemented from TMVA::Node.

Definition at line 285 of file DecisionTreeNode.h.

◆ GetParentTree()

virtual TMVA::BinaryTree * TMVA::Node::GetParentTree ( ) const
inlinevirtualinherited

Definition at line 125 of file Node.h.

◆ GetPos()

char TMVA::Node::GetPos ( ) const
inlineinherited

Definition at line 122 of file Node.h.

◆ GetPurity()

Float_t TMVA::DecisionTreeNode::GetPurity ( void ) const
inline

return S/(S+B) (purity) at this node (from training)

Definition at line 168 of file DecisionTreeNode.h.

◆ GetResponse()

Float_t TMVA::DecisionTreeNode::GetResponse ( void ) const
inline

return the response of the node (for regression)

Definition at line 176 of file DecisionTreeNode.h.

◆ GetRight()

DecisionTreeNode * TMVA::DecisionTreeNode::GetRight ( ) const
inlineoverridevirtual

Reimplemented from TMVA::Node.

Definition at line 284 of file DecisionTreeNode.h.

◆ GetRMS()

Float_t TMVA::DecisionTreeNode::GetRMS ( void ) const
inline

return the RMS of the response of the node (for regression)

Definition at line 182 of file DecisionTreeNode.h.

◆ GetSampleMax()

Float_t TMVA::DecisionTreeNode::GetSampleMax ( UInt_t ivar) const

return the maximum of variable ivar from the training sample that pass/end up in this node, if traininfo defined, otherwise Log Fatal and return 9999

Definition at line 426 of file DecisionTreeNode.cxx.

◆ GetSampleMin()

Float_t TMVA::DecisionTreeNode::GetSampleMin ( UInt_t ivar) const

return the minimum of variable ivar from the training sample that pass/end up in this node, if traininfo defined, otherwise Log Fatal and return -9999

Definition at line 414 of file DecisionTreeNode.cxx.

◆ GetSelector()

Short_t TMVA::DecisionTreeNode::GetSelector ( ) const
inline

return index of variable used for discrimination at this node

Definition at line 150 of file DecisionTreeNode.h.

◆ GetSeparationGain()

Float_t TMVA::DecisionTreeNode::GetSeparationGain ( void ) const
inline

return the gain in separation obtained by this node's selection, or -1 if traininfo undefined

Definition at line 266 of file DecisionTreeNode.h.

◆ GetSeparationIndex()

Float_t TMVA::DecisionTreeNode::GetSeparationIndex ( void ) const
inline

return the separation index AT this node, or 0 if traininfo undefined

Definition at line 260 of file DecisionTreeNode.h.

◆ GetSubTreeR()

Double_t TMVA::DecisionTreeNode::GetSubTreeR ( ) const
inline

return the resubstitution estimate, R(T_t), of the tree rooted at this node, or -1 if traininfo undefined

Definition at line 300 of file DecisionTreeNode.h.

◆ GetSumTarget()

Float_t TMVA::DecisionTreeNode::GetSumTarget ( ) const
inline

return sum target, or -9999 if traininfo undefined

Definition at line 340 of file DecisionTreeNode.h.

◆ GetSumTarget2()

Float_t TMVA::DecisionTreeNode::GetSumTarget2 ( ) const
inline

return sum target 2, or -9999 if traininfo undefined

Definition at line 342 of file DecisionTreeNode.h.

◆ GetTmvaVersionCode()

UInt_t TMVA::DecisionTreeNode::GetTmvaVersionCode ( )
static

Definition at line 560 of file DecisionTreeNode.cxx.

◆ GoesLeft()

Bool_t TMVA::DecisionTreeNode::GoesLeft ( const Event & e) const
overridevirtual

test event if it descends the tree at this node to the left

Implements TMVA::Node.

Definition at line 178 of file DecisionTreeNode.cxx.

◆ GoesRight()

Bool_t TMVA::DecisionTreeNode::GoesRight ( const Event & e) const
overridevirtual

test event if it descends the tree at this node to the right

Implements TMVA::Node.

Definition at line 154 of file DecisionTreeNode.cxx.

◆ IncrementNBkgEvents()

void TMVA::DecisionTreeNode::IncrementNBkgEvents ( Float_t b)
inline

increment the sum of the backgr weights in the node, if traininfo defined

Definition at line 215 of file DecisionTreeNode.h.

◆ IncrementNBkgEvents_unweighted()

void TMVA::DecisionTreeNode::IncrementNBkgEvents_unweighted ( )
inline

increment the sum of the backgr weights in the node, if traininfo defined

Definition at line 224 of file DecisionTreeNode.h.

◆ IncrementNEvents()

void TMVA::DecisionTreeNode::IncrementNEvents ( Float_t nev)
inline

Definition at line 218 of file DecisionTreeNode.h.

◆ IncrementNEvents_unweighted()

void TMVA::DecisionTreeNode::IncrementNEvents_unweighted ( )
inline

increment the number of events that entered the node (during training), if traininfo defined

Definition at line 227 of file DecisionTreeNode.h.

◆ IncrementNSigEvents()

void TMVA::DecisionTreeNode::IncrementNSigEvents ( Float_t s)
inline

increment the sum of the signal weights in the node, if traininfo defined

Definition at line 212 of file DecisionTreeNode.h.

◆ IncrementNSigEvents_unweighted()

void TMVA::DecisionTreeNode::IncrementNSigEvents_unweighted ( )
inline

increment the sum of the signal weights in the node, if traininfo defined

Definition at line 221 of file DecisionTreeNode.h.

◆ IsA()

TClass * TMVA::DecisionTreeNode::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TMVA::Node.

Definition at line 397 of file DecisionTreeNode.h.

◆ IsTerminal()

Bool_t TMVA::DecisionTreeNode::IsTerminal ( ) const
inline

flag indicates whether this node is terminal

Definition at line 349 of file DecisionTreeNode.h.

◆ IsTraining()

Bool_t TMVA::DecisionTreeNode::IsTraining ( )
static

Definition at line 556 of file DecisionTreeNode.cxx.

◆ Log()

TMVA::MsgLogger & TMVA::DecisionTreeNode::Log ( )
staticprotected

Definition at line 542 of file DecisionTreeNode.cxx.

◆ Print()

void TMVA::DecisionTreeNode::Print ( std::ostream & os) const
overridevirtual

print the node

Implements TMVA::Node.

Definition at line 208 of file DecisionTreeNode.cxx.

◆ PrintPrune()

void TMVA::DecisionTreeNode::PrintPrune ( std::ostream & os) const

printout of the node (can be read in with ReadDataRecord)

Definition at line 380 of file DecisionTreeNode.cxx.

◆ PrintRec()

void TMVA::DecisionTreeNode::PrintRec ( std::ostream & os) const
overridevirtual

recursively print the node and its daughters (--> print the 'tree')

Implements TMVA::Node.

Definition at line 240 of file DecisionTreeNode.cxx.

◆ PrintRecPrune()

void TMVA::DecisionTreeNode::PrintRecPrune ( std::ostream & os) const

recursive printout of the node and its daughters

Definition at line 392 of file DecisionTreeNode.cxx.

◆ ReadAttributes()

void TMVA::DecisionTreeNode::ReadAttributes ( void * node,
UInt_t tmva_Version_Code = 262657 )
overridevirtual

Implements TMVA::Node.

Definition at line 457 of file DecisionTreeNode.cxx.

◆ ReadContent()

void TMVA::DecisionTreeNode::ReadContent ( std::stringstream & s)
overridevirtual

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 537 of file DecisionTreeNode.cxx.

◆ ReadDataRecord()

Bool_t TMVA::DecisionTreeNode::ReadDataRecord ( std::istream & is,
UInt_t tmva_Version_Code = 262657 )
overridevirtual

Read the data block.

Implements TMVA::Node.

Definition at line 271 of file DecisionTreeNode.cxx.

◆ ReadXML()

void TMVA::Node::ReadXML ( void * node,
UInt_t tmva_Version_Code = 262657 )
inherited

read attributes from XML

Definition at line 162 of file Node.cxx.

◆ ResetValidationData()

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 365 of file DecisionTreeNode.cxx.

◆ SetAlpha()

void TMVA::DecisionTreeNode::SetAlpha ( Double_t alpha)
inline

set the critical point alpha, if traininfo defined

Definition at line 306 of file DecisionTreeNode.h.

◆ SetAlphaMinSubtree()

void TMVA::DecisionTreeNode::SetAlphaMinSubtree ( Double_t g)
inline

set the minimum alpha in the tree rooted at this node, if traininfo defined

Definition at line 311 of file DecisionTreeNode.h.

◆ SetCC()

void TMVA::DecisionTreeNode::SetCC ( Double_t cc)

Set CC, if traininfo defined, otherwise Log Fatal.

Definition at line 403 of file DecisionTreeNode.cxx.

◆ SetCutType()

void TMVA::DecisionTreeNode::SetCutType ( Bool_t t)
inline

set true: if event variable > cutValue ==> signal , false otherwise

Definition at line 158 of file DecisionTreeNode.h.

◆ SetCutValue()

void TMVA::DecisionTreeNode::SetCutValue ( Float_t c)
inline

set the cut value applied at this node

Definition at line 153 of file DecisionTreeNode.h.

◆ SetDepth()

void TMVA::Node::SetDepth ( UInt_t d)
inlineinherited

Definition at line 113 of file Node.h.

◆ SetFisherCoeff()

void TMVA::DecisionTreeNode::SetFisherCoeff ( Int_t ivar,
Double_t coeff )

set fisher coefficients

Definition at line 517 of file DecisionTreeNode.cxx.

◆ SetIsTraining()

void TMVA::DecisionTreeNode::SetIsTraining ( bool on)
static

Definition at line 548 of file DecisionTreeNode.cxx.

◆ SetLeft()

void TMVA::DecisionTreeNode::SetLeft ( Node * l)
inlineoverridevirtual

Reimplemented from TMVA::Node.

Definition at line 288 of file DecisionTreeNode.h.

◆ SetNBkgEvents()

void TMVA::DecisionTreeNode::SetNBkgEvents ( Float_t b)
inline

set the sum of the backgr weights in the node, if traininfo defined

Definition at line 188 of file DecisionTreeNode.h.

◆ SetNBkgEvents_unboosted()

void TMVA::DecisionTreeNode::SetNBkgEvents_unboosted ( Float_t b)
inline

set the sum of the unboosted backgr events in the node, if traininfo defined

Definition at line 206 of file DecisionTreeNode.h.

◆ SetNBkgEvents_unweighted()

void TMVA::DecisionTreeNode::SetNBkgEvents_unweighted ( Float_t b)
inline

set the sum of the unweighted backgr events in the node, if traininfo defined

Definition at line 197 of file DecisionTreeNode.h.

◆ SetNBValidation()

void TMVA::DecisionTreeNode::SetNBValidation ( Double_t b)
inline

set number of background events from the pruning validation sample, if traininfo defined

Definition at line 321 of file DecisionTreeNode.h.

◆ SetNEvents()

void TMVA::DecisionTreeNode::SetNEvents ( Float_t nev)
inline

set the number of events that entered the node (during training), if traininfo defined

Definition at line 191 of file DecisionTreeNode.h.

◆ SetNEvents_unboosted()

void TMVA::DecisionTreeNode::SetNEvents_unboosted ( Float_t nev)
inline

set the number of unboosted events that entered the node (during training), if traininfo defined

Definition at line 209 of file DecisionTreeNode.h.

◆ SetNEvents_unweighted()

void TMVA::DecisionTreeNode::SetNEvents_unweighted ( Float_t nev)
inline

set the number of unweighted events that entered the node (during training), if traininfo defined

Definition at line 200 of file DecisionTreeNode.h.

◆ SetNFisherCoeff()

void TMVA::DecisionTreeNode::SetNFisherCoeff ( Int_t nvars)
inline

Definition at line 134 of file DecisionTreeNode.h.

◆ SetNodeR()

void TMVA::DecisionTreeNode::SetNodeR ( Double_t r)
inline

set the node resubstitution estimate, R(t), for Cost Complexity pruning, if traininfo defined

Definition at line 293 of file DecisionTreeNode.h.

◆ SetNodeType()

void TMVA::DecisionTreeNode::SetNodeType ( Int_t t)
inline

set node type: 1 signal node, -1 bkg leave, 0 intermediate Node

Definition at line 163 of file DecisionTreeNode.h.

◆ SetNSigEvents()

void TMVA::DecisionTreeNode::SetNSigEvents ( Float_t s)
inline

set the sum of the signal weights in the node, if traininfo defined

Definition at line 185 of file DecisionTreeNode.h.

◆ SetNSigEvents_unboosted()

void TMVA::DecisionTreeNode::SetNSigEvents_unboosted ( Float_t s)
inline

set the sum of the unboosted signal events in the node, if traininfo defined

Definition at line 203 of file DecisionTreeNode.h.

◆ SetNSigEvents_unweighted()

void TMVA::DecisionTreeNode::SetNSigEvents_unweighted ( Float_t s)
inline

set the sum of the unweighted signal events in the node, if traininfo defined

Definition at line 194 of file DecisionTreeNode.h.

◆ SetNSValidation()

void TMVA::DecisionTreeNode::SetNSValidation ( Double_t s)
inline

set number of signal events from the pruning validation sample, if traininfo defined

Definition at line 323 of file DecisionTreeNode.h.

◆ SetNTerminal()

void TMVA::DecisionTreeNode::SetNTerminal ( Int_t n)
inline

set number of terminal nodes in the subtree rooted here, if traininfo defined

Definition at line 316 of file DecisionTreeNode.h.

◆ SetParent()

void TMVA::DecisionTreeNode::SetParent ( Node * p)
inlineoverridevirtual

Reimplemented from TMVA::Node.

Definition at line 290 of file DecisionTreeNode.h.

◆ SetParentTree()

virtual void TMVA::Node::SetParentTree ( TMVA::BinaryTree * t)
inlinevirtualinherited

Definition at line 128 of file Node.h.

◆ SetPos()

void TMVA::Node::SetPos ( char s)
inlineinherited

Definition at line 119 of file Node.h.

◆ SetPurity()

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 190 of file DecisionTreeNode.cxx.

◆ SetResponse()

void TMVA::DecisionTreeNode::SetResponse ( Float_t r)
inline

set the response of the node (for regression)

Definition at line 173 of file DecisionTreeNode.h.

◆ SetRight()

void TMVA::DecisionTreeNode::SetRight ( Node * r)
inlineoverridevirtual

Reimplemented from TMVA::Node.

Definition at line 289 of file DecisionTreeNode.h.

◆ SetRMS()

void TMVA::DecisionTreeNode::SetRMS ( Float_t r)
inline

set the RMS of the response of the node (for regression)

Definition at line 179 of file DecisionTreeNode.h.

◆ SetSampleMax()

void TMVA::DecisionTreeNode::SetSampleMax ( UInt_t ivar,
Float_t xmax )

set the maximum of variable ivar from the training sample that pass/end up in this node, if traininfo defined

Definition at line 448 of file DecisionTreeNode.cxx.

◆ SetSampleMin()

void TMVA::DecisionTreeNode::SetSampleMin ( UInt_t ivar,
Float_t xmin )

set the minimum of variable ivar from the training sample that pass/end up in this node, if traininfo defined

Definition at line 437 of file DecisionTreeNode.cxx.

◆ SetSelector()

void TMVA::DecisionTreeNode::SetSelector ( Short_t i)
inline

set index of variable used for discrimination at this node

Definition at line 148 of file DecisionTreeNode.h.

◆ SetSeparationGain()

void TMVA::DecisionTreeNode::SetSeparationGain ( Float_t sep)
inline

set the separation, or information gained BY this node's selection, if traininfo defined

Definition at line 263 of file DecisionTreeNode.h.

◆ SetSeparationIndex()

void TMVA::DecisionTreeNode::SetSeparationIndex ( Float_t sep)
inline

set the chosen index, measure of "purity" (separation between S and B) AT this node, if traininfo defined

Definition at line 257 of file DecisionTreeNode.h.

◆ SetSubTreeR()

void TMVA::DecisionTreeNode::SetSubTreeR ( Double_t r)
inline

set the resubstitution estimate, R(T_t), of the tree rooted at this node, if traininfo defined

Definition at line 298 of file DecisionTreeNode.h.

◆ SetSumTarget()

void TMVA::DecisionTreeNode::SetSumTarget ( Float_t t)
inline

set sum target, if traininfo defined

Definition at line 330 of file DecisionTreeNode.h.

◆ SetSumTarget2()

void TMVA::DecisionTreeNode::SetSumTarget2 ( Float_t t2)
inline

set sum target 2, if traininfo defined

Definition at line 332 of file DecisionTreeNode.h.

◆ SetTerminal()

void TMVA::DecisionTreeNode::SetTerminal ( Bool_t s = kTRUE)
inline

Definition at line 350 of file DecisionTreeNode.h.

◆ SetTmvaVersionCode()

void TMVA::DecisionTreeNode::SetTmvaVersionCode ( UInt_t code)
static

Definition at line 552 of file DecisionTreeNode.cxx.

◆ Streamer()

void TMVA::DecisionTreeNode::Streamer ( TBuffer & )
overridevirtual

Reimplemented from TMVA::Node.

◆ StreamerNVirtual()

void TMVA::DecisionTreeNode::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 397 of file DecisionTreeNode.h.

Member Data Documentation

◆ fCutType

Bool_t TMVA::DecisionTreeNode::fCutType
protected

true: if event variable > cutValue ==> signal , false otherwise

Definition at line 383 of file DecisionTreeNode.h.

◆ fCutValue

Float_t TMVA::DecisionTreeNode::fCutValue
protected

cut value applied on this node to discriminate bkg against sig

Definition at line 382 of file DecisionTreeNode.h.

◆ fDepth

UInt_t TMVA::Node::fDepth
protectedinherited

depth of the node within the tree (seen from root node)

Definition at line 143 of file Node.h.

◆ fFisherCoeff

std::vector<Double_t> TMVA::DecisionTreeNode::fFisherCoeff
protected

the fisher coeff (offset at the last element)

Definition at line 380 of file DecisionTreeNode.h.

◆ fgCount

Int_t TMVA::Node::fgCount = 0
staticprivateinherited

counter of all nodes present.. for debug.. to spot memory leaks...

Definition at line 148 of file Node.h.

◆ fgIsTraining

Bool_t TMVA::DecisionTreeNode::fgIsTraining = false
staticprotected

static variable to flag training phase in which we need fTrainInfo

Definition at line 377 of file DecisionTreeNode.h.

◆ fgTmva_Version_Code

UInt_t TMVA::DecisionTreeNode::fgTmva_Version_Code = 0
staticprotected

set only when read from weightfile

Definition at line 378 of file DecisionTreeNode.h.

◆ fIsTerminalNode

Bool_t TMVA::DecisionTreeNode::fIsTerminalNode
protected

! flag to set node as terminal (i.e., without deleting its descendants)

Definition at line 391 of file DecisionTreeNode.h.

◆ fLeft

Node* TMVA::Node::fLeft
protectedinherited

pointers to the two "daughter" nodes

Definition at line 139 of file Node.h.

◆ fNodeType

Int_t TMVA::DecisionTreeNode::fNodeType
protected

Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal.

Definition at line 388 of file DecisionTreeNode.h.

◆ fParent

Node* TMVA::Node::fParent
protectedinherited

the previous (parent) node

Definition at line 138 of file Node.h.

◆ fParentTree

BinaryTree* TMVA::Node::fParentTree
protectedinherited

pointer to the parent tree to which the Node belongs

Definition at line 145 of file Node.h.

◆ fPos

char TMVA::Node::fPos
protectedinherited

position, i.e. it is a left (l) or right (r) daughter

Definition at line 142 of file Node.h.

◆ fPurity

Float_t TMVA::DecisionTreeNode::fPurity
protected

the node purity

Definition at line 389 of file DecisionTreeNode.h.

◆ fResponse

Float_t TMVA::DecisionTreeNode::fResponse
protected

response value in case of regression

Definition at line 386 of file DecisionTreeNode.h.

◆ fRight

Node* TMVA::Node::fRight
protectedinherited

pointers to the two "daughter" nodes

Definition at line 140 of file Node.h.

◆ fRMS

Float_t TMVA::DecisionTreeNode::fRMS
protected

response RMS of the regression node

Definition at line 387 of file DecisionTreeNode.h.

◆ fSelector

Short_t TMVA::DecisionTreeNode::fSelector
protected

index of variable used in node selection (decision tree)

Definition at line 384 of file DecisionTreeNode.h.

◆ fTrainInfo

DTNodeTrainingInfo* TMVA::DecisionTreeNode::fTrainInfo
mutableprotected

Definition at line 393 of file DecisionTreeNode.h.


The documentation for this class was generated from the following files: