30#ifndef ROOT_TMVA_DecisionTreeNode
31#define ROOT_TMVA_DecisionTreeNode
269 virtual void Print( std::ostream& os )
const;
272 virtual void PrintRec( std::ostream& os )
const;
359 static MsgLogger&
Log();
#define ClassDef(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
#define TMVA_VERSION_CODE
Float_t fSumTarget2
sum of weight*target^2 used for the calculation of the variance (regression)
Double_t fG
minimum alpha in subtree rooted at this node
Double_t fAlpha
critical alpha for this node
Double_t fNodeR
node resubstitution estimate, R(t)
std::vector< Float_t > fSampleMax
the maxima for each ivar of the sample on the node during training
Float_t fNEvents
number of events in that entered the node (during training)
Float_t fNEvents_unboosted
number of events in that entered the node (during training)
Float_t fSeparationIndex
measure of "purity" (separation between S and B) AT this node
Float_t fNEvents_unweighted
number of events in that entered the node (during training)
Float_t fNSigEvents
sum of weights of signal event in the node
Float_t fNSigEvents_unweighted
sum of signal event in the node
Float_t fSeparationGain
measure of "purity", separation, or information gained BY this nodes selection
Float_t fNSigEvents_unboosted
sum of signal event in the node
DTNodeTrainingInfo(const DTNodeTrainingInfo &n)
Float_t fNBkgEvents_unboosted
sum of backgr event in the node
Double_t fSubTreeR
R(T) = Sum(R(t) : t in ~T)
Double_t fNB
sum of weights of background events from the pruning sample in this node
Double_t fCC
debug variable for cost complexity pruning ..
std::vector< Float_t > fSampleMin
the minima for each ivar of the sample on the node during training
Float_t fSumTarget
sum of weight*target used for the calculation of the variance (regression)
Double_t fNS
ditto for the signal events
Float_t fNBkgEvents
sum of weights of backgr event in the node
Int_t fNTerminal
number of terminal nodes in subtree rooted at this node
Float_t fNBkgEvents_unweighted
sum of backgr event in the node
virtual void AddContentToNode(std::stringstream &s) const
adding attributes to tree node (well, was used in BinarySearchTree, and somehow I guess someone progr...
void SetNEvents_unweighted(Float_t nev)
set the number of unweighted events that entered the node (during training)
Float_t GetNBkgEvents_unboosted(void) const
return the sum of unboosted backgr weights in the node
virtual void ReadAttributes(void *node, UInt_t tmva_Version_Code=262657)
DTNodeTrainingInfo * fTrainInfo
Bool_t fIsTerminalNode
! flag to set node as terminal (i.e., without deleting its descendants)
virtual ~DecisionTreeNode()
destructor
Float_t GetNSigEvents_unweighted(void) const
Float_t GetNBkgEvents_unweighted(void) const
return the sum of unweighted backgr weights in the node
void SetNodeType(Int_t t)
set node type: 1 signal node, -1 bkg leave, 0 intermediate Node
Int_t fNodeType
Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal.
Double_t GetSubTreeR() const
Float_t GetSeparationIndex(void) const
return the separation index AT this node
void SetSeparationGain(Float_t sep)
set the separation, or information gained BY this nodes selection
void SetNBkgEvents(Float_t b)
set the sum of the backgr weights in the node
void SetCutType(Bool_t t)
set true: if event variable > cutValue ==> signal , false otherwise
Float_t GetNSigEvents_unboosted(void) const
return the sum of unboosted signal weights in the node
Double_t GetNSValidation() const
static void SetIsTraining(bool on)
void PrintPrune(std::ostream &os) const
printout of the node (can be read in with ReadDataRecord)
Float_t GetSumTarget() const
void IncrementNEvents_unweighted()
increment the number of events that entered the node (during training)
void PrintRecPrune(std::ostream &os) const
recursive printout of the node and its daughters
void SetFisherCoeff(Int_t ivar, Double_t coeff)
set fisher coefficients
void SetNSigEvents_unboosted(Float_t s)
set the sum of the unboosted signal events in the node
void SetSumTarget2(Float_t t2)
Float_t fRMS
response RMS of the regression node
void SetAlphaMinSubtree(Double_t g)
static UInt_t fgTmva_Version_Code
set only when read from weightfile
void IncrementNBkgEvents(Float_t b)
increment the sum of the backgr weights in the node
Short_t fSelector
index of variable used in node selection (decision tree)
void SetNEvents_unboosted(Float_t nev)
set the number of unboosted events that entered the node (during training)
Float_t GetNSigEvents(void) const
return the sum of the signal weights in the node
Float_t fPurity
the node purity
virtual void SetLeft(Node *l)
Double_t GetAlphaMinSubtree() const
void SetTerminal(Bool_t s=kTRUE)
Float_t GetNEvents_unweighted(void) const
return the number of unweighted events that entered the node (during training)
void SetResponse(Float_t r)
set the response of the node (for regression)
UInt_t GetNFisherCoeff() const
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 ClearNodeAndAllDaughters()
clear the nodes (their S/N, Nevents etc), just keep the structure of the tree
virtual Bool_t GoesLeft(const Event &) const
test event if it descends the tree at this node to the left
static void SetTmvaVersionCode(UInt_t code)
virtual void ReadContent(std::stringstream &s)
reading attributes from tree node (well, was used in BinarySearchTree, and somehow I guess someone pr...
void SetNBValidation(Double_t b)
Float_t GetRMS(void) const
return the RMS of the response of the node (for regression)
void IncrementNEvents(Float_t nev)
void SetPurity(void)
return the S/(S+B) (purity) for the node REM: even if nodes with purity 0.01 are very PURE background...
void SetSubTreeR(Double_t r)
void AddToSumTarget2(Float_t t2)
virtual void Print(std::ostream &os) const
print the node
virtual DecisionTreeNode * GetLeft() const
Double_t GetNodeR() const
Float_t fCutValue
cut value applied on this node to discriminate bkg against sig
Float_t GetSumTarget2() const
virtual Bool_t GoesRight(const Event &) const
test event if it descends the tree at this node to the right
DecisionTreeNode()
constructor of an essentially "empty" node floating in space
void SetNFisherCoeff(Int_t nvars)
virtual void AddAttributesToNode(void *node) const
add attribute to xml
Short_t GetSelector() const
return index of variable used for discrimination at this node
virtual Bool_t ReadDataRecord(std::istream &is, UInt_t tmva_Version_Code=262657)
Read the data block.
static UInt_t GetTmvaVersionCode()
void SetNSigEvents(Float_t s)
set the sum of the signal weights in the node
Float_t GetResponse(void) const
return the response of the node (for regression)
Float_t GetCutValue(void) const
return the cut value applied at this node
Int_t GetNodeType(void) const
return node type: 1 signal node, -1 bkg leave, 0 intermediate Node
Double_t GetAlpha() const
Int_t GetNTerminal() const
void IncrementNBkgEvents_unweighted()
increment the sum of the backgr weights in the node
Bool_t fCutType
true: if event variable > cutValue ==> signal , false otherwise
Bool_t GetCutType(void) const
return kTRUE: Cuts select signal, kFALSE: Cuts select bkg
void ResetValidationData()
temporary stored node values (number of events, etc.) that originate not from the training but from t...
virtual void PrintRec(std::ostream &os) const
recursively print the node and its daughters (--> print the 'tree')
void SetNSigEvents_unweighted(Float_t s)
set the sum of the unweighted signal events in the node
Float_t GetNEvents(void) const
return the number of events that entered the node (during training)
virtual Node * CreateNode() const
Double_t GetNBValidation() const
static bool fgIsTraining
static variable to flag training phase in which we need fTrainInfo
void SetAlpha(Double_t alpha)
void SetSeparationIndex(Float_t sep)
set the chosen index, measure of "purity" (separation between S and B) AT this node
virtual void SetRight(Node *r)
void SetRMS(Float_t r)
set the RMS of the response of the node (for regression)
Float_t fResponse
response value in case of regression
void IncrementNSigEvents_unweighted()
increment the sum of the signal weights in the node
void SetSumTarget(Float_t t)
virtual void SetParent(Node *p)
void SetNodeR(Double_t r)
void SetNBkgEvents_unboosted(Float_t b)
set the sum of the unboosted backgr events in the node
Float_t GetPurity(void) const
return S/(S+B) (purity) at this node (from training)
Float_t GetNEvents_unboosted(void) const
return the number of unboosted events that entered the node (during training)
void IncrementNSigEvents(Float_t s)
increment the sum of the signal weights in the node
Float_t GetSeparationGain(void) const
return the gain in separation obtained by this nodes selection
Float_t GetSampleMax(UInt_t ivar) const
return the maximum of variable ivar from the training sample that pass/end up in this node
void SetCutValue(Float_t c)
set the cut value applied at this node
Float_t GetNBkgEvents(void) const
return the sum of the backgr weights in the 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
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
std::vector< Double_t > fFisherCoeff
the fisher coeff (offset at the last element)
virtual DecisionTreeNode * GetParent() const
Double_t GetFisherCoeff(Int_t ivar) const
get fisher coefficients
void SetNBkgEvents_unweighted(Float_t b)
set the sum of the unweighted backgr events in the node
void SetNSValidation(Double_t s)
void AddToSumTarget(Float_t t)
Bool_t IsTerminal() const
flag indicates whether this node is terminal
void SetNTerminal(Int_t n)
void SetNEvents(Float_t nev)
set the number of events that entered the node (during training)
virtual DecisionTreeNode * GetRight() const
Node for the BinarySearch or Decision Trees.
Node * fLeft
pointers to the two "daughter" nodes
Node * fParent
the previous (parent) node
Node * fRight
pointers to the two "daughter" nodes
create variable transformations