#include <DecisionTree.h>
Inheritance diagram for TMVA::DecisionTree:
Definition at line 69 of file DecisionTree.h.
typedef std::vector<TMVA::Event*> TMVA::DecisionTree::EventList |
Definition at line 77 of file DecisionTree.h.
typedef std::vector<TMVA::Event*> TMVA::DecisionTree::EventList |
Definition at line 77 of file DecisionTree.h.
Definition at line 140 of file DecisionTree.h.
Definition at line 140 of file DecisionTree.h.
TMVA::DecisionTree::DecisionTree | ( | void | ) |
Referenced by CreateFromXML(), and CreateTree().
TMVA::DecisionTree::DecisionTree | ( | SeparationBase * | sepType, | |
Int_t | minSize, | |||
Int_t | nCuts, | |||
UInt_t | cls = 0 , |
|||
Bool_t | randomisedTree = kFALSE , |
|||
Int_t | useNvars = 0 , |
|||
Bool_t | usePoissonNvars = kFALSE , |
|||
UInt_t | nNodesMax = 999999 , |
|||
UInt_t | nMaxDepth = 9999999 , |
|||
Int_t | iSeed = fgRandomSeed , |
|||
Float_t | purityLimit = 0.5 , |
|||
Int_t | treeID = 0 | |||
) |
Definition at line 122 of file DecisionTree.cxx.
References Endl, fAnalysisType, fNCuts, fRegType, TMVA::Types::kClassification, TMVA::Types::kRegression, TMVA::kWARNING, TMVA::BinaryTree::Log(), and NULL.
TMVA::DecisionTree::DecisionTree | ( | const DecisionTree & | d | ) |
Definition at line 171 of file DecisionTree.cxx.
References d, TMVA::BinaryTree::fNNodes, SetParentTreeInNodes(), and TMVA::BinaryTree::SetRoot().
TMVA::DecisionTree::~DecisionTree | ( | void | ) | [virtual] |
TMVA::DecisionTree::DecisionTree | ( | void | ) |
TMVA::DecisionTree::DecisionTree | ( | SeparationBase * | sepType, | |
Int_t | minSize, | |||
Int_t | nCuts, | |||
UInt_t | cls = 0 , |
|||
Bool_t | randomisedTree = kFALSE , |
|||
Int_t | useNvars = 0 , |
|||
Bool_t | usePoissonNvars = kFALSE , |
|||
UInt_t | nNodesMax = 999999 , |
|||
UInt_t | nMaxDepth = 9999999 , |
|||
Int_t | iSeed = fgRandomSeed , |
|||
Float_t | purityLimit = 0.5 , |
|||
Int_t | treeID = 0 | |||
) |
TMVA::DecisionTree::DecisionTree | ( | const DecisionTree & | d | ) |
virtual TMVA::DecisionTree::~DecisionTree | ( | void | ) | [virtual] |
virtual DecisionTreeNode* TMVA::DecisionTree::GetRoot | ( | ) | const [inline, virtual] |
Reimplemented from TMVA::BinaryTree.
Definition at line 97 of file DecisionTree.h.
References TMVA::BinaryTree::fRoot.
Referenced by ApplyValidationSample(), TMVA::RuleEnsemble::CalcNRules(), TMVA::CostComplexityPruneTool::CalculatePruningInfo(), TMVA::ExpectedErrorPruneTool::CalculatePruningInfo(), CheckEvent(), CheckEventWithPrunedTree(), CleanTree(), CountLeafNodes(), DescendTree(), FillEvent(), GetNode(), TMVA::RuleEnsemble::MakeRulesFromTree(), TMVA::CostComplexityPruneTool::Optimize(), SetParentTreeInNodes(), and TestPrunedTreeQuality().
virtual DecisionTreeNode* TMVA::DecisionTree::CreateNode | ( | UInt_t | ) | const [inline, virtual] |
virtual BinaryTree* TMVA::DecisionTree::CreateTree | ( | ) | const [inline, virtual] |
Implements TMVA::BinaryTree.
Definition at line 99 of file DecisionTree.h.
References DecisionTree().
TMVA::DecisionTree * TMVA::DecisionTree::CreateFromXML | ( | void * | node, | |
UInt_t | tmva_Version_Code = TMVA_VERSION_CODE | |||
) | [static] |
Definition at line 249 of file DecisionTree.cxx.
References DecisionTree(), TMVA::gTools(), TMVA::Tools::ReadAttr(), TMVA::BinaryTree::ReadXML(), and type.
Referenced by G__G__TMVA2_296_0_7(), G__setup_memfuncTMVAcLcLDecisionTree(), and TMVA::MethodBDT::ReadWeightsFromXML().
virtual const char* TMVA::DecisionTree::ClassName | ( | ) | const [inline, virtual] |
UInt_t TMVA::DecisionTree::BuildTree | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node = NULL | |||
) |
Referenced by TMVA::RuleFit::BuildTree(), and TMVA::MethodDT::Train().
Double_t TMVA::DecisionTree::TrainNode | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node | |||
) | [inline] |
Double_t TMVA::DecisionTree::TrainNodeFast | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node | |||
) |
Referenced by TrainNode().
Double_t TMVA::DecisionTree::TrainNodeFull | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node | |||
) |
void TMVA::DecisionTree::GetRandomisedVariables | ( | Bool_t * | useVariable, | |
UInt_t * | variableMap, | |||
UInt_t & | nVars | |||
) |
Definition at line 823 of file DecisionTree.cxx.
References fMyTrandom, fUseNvars, fUsePoissonNvars, kFALSE, kTRUE, TMath::Max(), TMath::Min(), TRandom::Poisson(), TRandom3::Rndm(), and TMath::Sqrt().
std::vector< Double_t > TMVA::DecisionTree::GetFisherCoefficients | ( | const EventList & | eventSample, | |
UInt_t | nFisherVars, | |||
UInt_t * | mapVarInFisher | |||
) |
Definition at line 1201 of file DecisionTree.cxx.
References TMath::Abs(), d, TMatrixT< Element >::Determinant(), E, fClass, TMatrixT< Element >::Invert(), k, TMVA::kFATAL, TMVA::kWARNING, TMVA::BinaryTree::Log(), TMath::Sqrt(), x, and y.
void TMVA::DecisionTree::FillTree | ( | EventList & | eventSample | ) |
void TMVA::DecisionTree::FillEvent | ( | TMVA::Event & | event, | |
TMVA::DecisionTreeNode * | node | |||
) |
Definition at line 465 of file DecisionTree.cxx.
References fClass, fSepType, TMVA::Event::GetClass(), TMVA::DecisionTreeNode::GetLeft(), TMVA::DecisionTreeNode::GetNBkgEvents(), TMVA::DecisionTreeNode::GetNodeType(), TMVA::DecisionTreeNode::GetNSigEvents(), TMVA::DecisionTreeNode::GetRight(), GetRoot(), TMVA::SeparationBase::GetSeparationIndex(), TMVA::Event::GetWeight(), TMVA::DecisionTreeNode::GoesRight(), TMVA::DecisionTreeNode::IncrementNBkgEvents(), TMVA::DecisionTreeNode::IncrementNBkgEvents_unweighted(), TMVA::DecisionTreeNode::IncrementNEvents(), TMVA::DecisionTreeNode::IncrementNEvents_unweighted(), TMVA::DecisionTreeNode::IncrementNSigEvents(), TMVA::DecisionTreeNode::IncrementNSigEvents_unweighted(), NULL, and TMVA::DecisionTreeNode::SetSeparationIndex().
Double_t TMVA::DecisionTree::CheckEvent | ( | const TMVA::Event & | , | |
Bool_t | UseYesNoLeaf = kFALSE | |||
) | const |
Definition at line 1537 of file DecisionTree.cxx.
References DoRegression(), TMVA::DecisionTreeNode::GetLeft(), TMVA::DecisionTreeNode::GetNodeType(), TMVA::DecisionTreeNode::GetPurity(), TMVA::DecisionTreeNode::GetResponse(), TMVA::DecisionTreeNode::GetRight(), GetRoot(), TMVA::DecisionTreeNode::GoesRight(), TMVA::kFATAL, and TMVA::BinaryTree::Log().
Referenced by TMVA::RuleFit::Boost(), TMVA::MethodDT::GetMvaValue(), TMVA::MethodBDT::TestTreeQuality(), and TMVA::MethodDT::TestTreeQuality().
TMVA::DecisionTreeNode * TMVA::DecisionTree::GetEventNode | ( | const TMVA::Event & | e | ) | const |
Definition at line 1522 of file DecisionTree.cxx.
References TMVA::DecisionTreeNode::GetLeft(), TMVA::DecisionTreeNode::GetNodeType(), TMVA::DecisionTreeNode::GetRight(), and TMVA::DecisionTreeNode::GoesRight().
vector< Double_t > TMVA::DecisionTree::GetVariableImportance | ( | ) |
Definition at line 1588 of file DecisionTree.cxx.
References RootCsg::epsilon, fVariableImportance, and i.
Referenced by GetVariableImportance().
Definition at line 1612 of file DecisionTree.cxx.
References GetVariableImportance(), TMVA::kFATAL, and TMVA::BinaryTree::Log().
void TMVA::DecisionTree::ClearTree | ( | ) |
void TMVA::DecisionTree::SetPruneMethod | ( | EPruneMethod | m = kCostComplexityPruning |
) | [inline] |
Definition at line 141 of file DecisionTree.h.
References fPruneMethod, and m.
Referenced by TMVA::RuleFit::BuildTree().
Referenced by TMVA::RuleFit::BuildTree(), and TMVA::MethodDT::PruneTree().
void TMVA::DecisionTree::SetPruneStrength | ( | Double_t | p | ) | [inline] |
Definition at line 147 of file DecisionTree.h.
References fPruneStrength.
Referenced by TMVA::RuleFit::BuildTree(), and TMVA::MethodDT::PruneTree().
Double_t TMVA::DecisionTree::GetPruneStrength | ( | ) | const [inline] |
void TMVA::DecisionTree::ApplyValidationSample | ( | const EventList * | validationSample | ) | const |
Definition at line 602 of file DecisionTree.cxx.
References CheckEventWithPrunedTree(), GetRoot(), and TMVA::DecisionTreeNode::ResetValidationData().
Referenced by TMVA::CostComplexityPruneTool::CalculatePruningInfo().
Double_t TMVA::DecisionTree::TestPrunedTreeQuality | ( | const DecisionTreeNode * | dt = NULL , |
|
Int_t | mode = 0 | |||
) | const |
Definition at line 615 of file DecisionTree.cxx.
References DoRegression(), GetNodePurityLimit(), GetRoot(), TMVA::kFATAL, TMVA::BinaryTree::Log(), n, and NULL.
Referenced by TMVA::CostComplexityPruneTool::CalculatePruningInfo(), and TMVA::CostComplexityPruneTool::Optimize().
void TMVA::DecisionTree::CheckEventWithPrunedTree | ( | const TMVA::Event & | ) | const |
Definition at line 658 of file DecisionTree.cxx.
References TMVA::DecisionTreeNode::AddToSumTarget(), TMVA::DecisionTreeNode::AddToSumTarget2(), fClass, TMVA::Event::GetClass(), TMVA::DecisionTreeNode::GetLeft(), TMVA::DecisionTreeNode::GetNBValidation(), TMVA::DecisionTreeNode::GetNSValidation(), TMVA::Event::GetNTargets(), TMVA::DecisionTreeNode::GetRight(), GetRoot(), TMVA::Event::GetTarget(), TMVA::Event::GetWeight(), TMVA::DecisionTreeNode::GoesRight(), TMVA::kFATAL, TMVA::BinaryTree::Log(), NULL, TMVA::DecisionTreeNode::SetNBValidation(), and TMVA::DecisionTreeNode::SetNSValidation().
Referenced by ApplyValidationSample().
Definition at line 693 of file DecisionTree.cxx.
Referenced by TMVA::CostComplexityPruneTool::CalculatePruningInfo().
void TMVA::DecisionTree::SetNodePurityLimit | ( | Double_t | p | ) | [inline] |
Double_t TMVA::DecisionTree::GetNodePurityLimit | ( | ) | const [inline] |
Definition at line 163 of file DecisionTree.h.
References fNodePurityLimit.
Referenced by TMVA::CostComplexityPruneTool::CalculatePruningInfo(), TMVA::ExpectedErrorPruneTool::CalculatePruningInfo(), TMVA::CCTreeWrapper::CheckEvent(), TestPrunedTreeQuality(), TMVA::CCTreeWrapper::TestTreeQuality(), and TMVA::MethodDT::TestTreeQuality().
void TMVA::DecisionTree::DescendTree | ( | Node * | n = NULL |
) |
Definition at line 736 of file DecisionTree.cxx.
References GetRoot(), TMVA::kFATAL, TMVA::BinaryTree::Log(), n, and NULL.
void TMVA::DecisionTree::SetParentTreeInNodes | ( | Node * | n = NULL |
) |
Definition at line 215 of file DecisionTree.cxx.
References Endl, GetRoot(), TMVA::BinaryTree::GetTotalTreeDepth(), TMVA::kFATAL, TMVA::BinaryTree::Log(), n, and NULL.
Referenced by DecisionTree().
TMVA::Node * TMVA::DecisionTree::GetNode | ( | ULong_t | sequence, | |
UInt_t | depth | |||
) |
Definition at line 804 of file DecisionTree.cxx.
References TMVA::BinaryTree::GetLeftDaughter(), GetRoot(), and i.
UInt_t TMVA::DecisionTree::CleanTree | ( | DecisionTreeNode * | node = NULL |
) |
Definition at line 509 of file DecisionTree.cxx.
References TMVA::BinaryTree::CountNodes(), TMVA::DecisionTreeNode::GetLeft(), TMVA::DecisionTreeNode::GetNodeType(), TMVA::DecisionTreeNode::GetRight(), GetRoot(), l, and NULL.
void TMVA::DecisionTree::PruneNode | ( | TMVA::DecisionTreeNode * | node | ) |
Definition at line 770 of file DecisionTree.cxx.
References TMVA::BinaryTree::CountNodes(), TMVA::BinaryTree::DeleteNode(), fNodePurityLimit, TMVA::DecisionTreeNode::GetLeft(), TMVA::DecisionTreeNode::GetPurity(), TMVA::DecisionTreeNode::GetRight(), l, NULL, TMVA::DecisionTreeNode::SetLeft(), TMVA::DecisionTreeNode::SetNodeType(), TMVA::DecisionTreeNode::SetRight(), TMVA::DecisionTreeNode::SetSelector(), and TMVA::DecisionTreeNode::SetSeparationGain().
Referenced by TMVA::MethodDT::PruneTree().
void TMVA::DecisionTree::PruneNodeInPlace | ( | TMVA::DecisionTreeNode * | node | ) |
Definition at line 790 of file DecisionTree.cxx.
References TMVA::DecisionTreeNode::GetNodeR(), RootCsg::infinity, kTRUE, NULL, TMVA::DecisionTreeNode::SetAlpha(), TMVA::DecisionTreeNode::SetAlphaMinSubtree(), TMVA::DecisionTreeNode::SetNTerminal(), TMVA::DecisionTreeNode::SetSubTreeR(), and TMVA::DecisionTreeNode::SetTerminal().
Referenced by TMVA::CostComplexityPruneTool::Optimize().
UInt_t TMVA::DecisionTree::CountLeafNodes | ( | TMVA::Node * | n = NULL |
) |
Definition at line 707 of file DecisionTree.cxx.
References GetRoot(), TMVA::kFATAL, TMVA::BinaryTree::Log(), n, and NULL.
void TMVA::DecisionTree::SetTreeID | ( | Int_t | treeID | ) | [inline] |
Int_t TMVA::DecisionTree::GetTreeID | ( | ) | [inline] |
Definition at line 185 of file DecisionTree.h.
References fTreeID.
Referenced by TMVA::CostComplexityPruneTool::CalculatePruningInfo(), and TMVA::CostComplexityPruneTool::Optimize().
Bool_t TMVA::DecisionTree::DoRegression | ( | ) | const [inline] |
Definition at line 187 of file DecisionTree.h.
References fAnalysisType, and TMVA::Types::kRegression.
Referenced by CheckEvent(), and TestPrunedTreeQuality().
void TMVA::DecisionTree::SetAnalysisType | ( | Types::EAnalysisType | t | ) | [inline] |
Definition at line 188 of file DecisionTree.h.
References fAnalysisType.
Referenced by TMVA::MethodDT::Train().
Types::EAnalysisType TMVA::DecisionTree::GetAnalysisType | ( | void | ) | [inline] |
void TMVA::DecisionTree::SetMinLinCorrForFisher | ( | Double_t | min | ) | [inline] |
virtual DecisionTreeNode* TMVA::DecisionTree::GetRoot | ( | ) | const [inline, virtual] |
Reimplemented from TMVA::BinaryTree.
Definition at line 97 of file DecisionTree.h.
References TMVA::BinaryTree::fRoot.
virtual DecisionTreeNode* TMVA::DecisionTree::CreateNode | ( | UInt_t | ) | const [inline, virtual] |
virtual BinaryTree* TMVA::DecisionTree::CreateTree | ( | ) | const [inline, virtual] |
Implements TMVA::BinaryTree.
Definition at line 99 of file DecisionTree.h.
References DecisionTree().
static DecisionTree* TMVA::DecisionTree::CreateFromXML | ( | void * | node, | |
UInt_t | tmva_Version_Code = TMVA_VERSION_CODE | |||
) | [static] |
virtual const char* TMVA::DecisionTree::ClassName | ( | ) | const [inline, virtual] |
UInt_t TMVA::DecisionTree::BuildTree | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node = NULL | |||
) |
Double_t TMVA::DecisionTree::TrainNode | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node | |||
) | [inline] |
Double_t TMVA::DecisionTree::TrainNodeFast | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node | |||
) |
Double_t TMVA::DecisionTree::TrainNodeFull | ( | const EventList & | eventSample, | |
DecisionTreeNode * | node | |||
) |
void TMVA::DecisionTree::GetRandomisedVariables | ( | Bool_t * | useVariable, | |
UInt_t * | variableMap, | |||
UInt_t & | nVars | |||
) |
std::vector<Double_t> TMVA::DecisionTree::GetFisherCoefficients | ( | const EventList & | eventSample, | |
UInt_t | nFisherVars, | |||
UInt_t * | mapVarInFisher | |||
) |
void TMVA::DecisionTree::FillTree | ( | EventList & | eventSample | ) |
void TMVA::DecisionTree::FillEvent | ( | TMVA::Event & | event, | |
TMVA::DecisionTreeNode * | node | |||
) |
Double_t TMVA::DecisionTree::CheckEvent | ( | const TMVA::Event & | , | |
Bool_t | UseYesNoLeaf = kFALSE | |||
) | const |
TMVA::DecisionTreeNode* TMVA::DecisionTree::GetEventNode | ( | const TMVA::Event & | e | ) | const |
std::vector< Double_t > TMVA::DecisionTree::GetVariableImportance | ( | ) |
void TMVA::DecisionTree::ClearTree | ( | ) |
void TMVA::DecisionTree::SetPruneMethod | ( | EPruneMethod | m = kCostComplexityPruning |
) | [inline] |
void TMVA::DecisionTree::SetPruneStrength | ( | Double_t | p | ) | [inline] |
Double_t TMVA::DecisionTree::GetPruneStrength | ( | ) | const [inline] |
void TMVA::DecisionTree::ApplyValidationSample | ( | const EventList * | validationSample | ) | const |
Double_t TMVA::DecisionTree::TestPrunedTreeQuality | ( | const DecisionTreeNode * | dt = NULL , |
|
Int_t | mode = 0 | |||
) | const |
void TMVA::DecisionTree::CheckEventWithPrunedTree | ( | const TMVA::Event & | ) | const |
void TMVA::DecisionTree::SetNodePurityLimit | ( | Double_t | p | ) | [inline] |
Double_t TMVA::DecisionTree::GetNodePurityLimit | ( | ) | const [inline] |
void TMVA::DecisionTree::DescendTree | ( | Node * | n = NULL |
) |
void TMVA::DecisionTree::SetParentTreeInNodes | ( | Node * | n = NULL |
) |
UInt_t TMVA::DecisionTree::CleanTree | ( | DecisionTreeNode * | node = NULL |
) |
void TMVA::DecisionTree::PruneNode | ( | TMVA::DecisionTreeNode * | node | ) |
void TMVA::DecisionTree::PruneNodeInPlace | ( | TMVA::DecisionTreeNode * | node | ) |
UInt_t TMVA::DecisionTree::CountLeafNodes | ( | TMVA::Node * | n = NULL |
) |
void TMVA::DecisionTree::SetTreeID | ( | Int_t | treeID | ) | [inline] |
Int_t TMVA::DecisionTree::GetTreeID | ( | ) | [inline] |
Bool_t TMVA::DecisionTree::DoRegression | ( | ) | const [inline] |
Definition at line 187 of file DecisionTree.h.
References fAnalysisType, and TMVA::Types::kRegression.
void TMVA::DecisionTree::SetAnalysisType | ( | Types::EAnalysisType | t | ) | [inline] |
Types::EAnalysisType TMVA::DecisionTree::GetAnalysisType | ( | void | ) | [inline] |
void TMVA::DecisionTree::SetMinLinCorrForFisher | ( | Double_t | min | ) | [inline] |
const Int_t TMVA::DecisionTree::fgRandomSeed [static, private] |
Definition at line 73 of file DecisionTree.h.
UInt_t TMVA::DecisionTree::fNvars [private] |
Definition at line 203 of file DecisionTree.h.
Int_t TMVA::DecisionTree::fNCuts [private] |
Bool_t TMVA::DecisionTree::fUseFisherCuts [private] |
Bool_t TMVA::DecisionTree::fUseExclusiveVars [private] |
SeparationBase* TMVA::DecisionTree::fSepType [private] |
RegressionVariance* TMVA::DecisionTree::fRegType [private] |
Double_t TMVA::DecisionTree::fMinSize [private] |
Definition at line 212 of file DecisionTree.h.
Double_t TMVA::DecisionTree::fMinSepGain [private] |
Definition at line 213 of file DecisionTree.h.
Bool_t TMVA::DecisionTree::fUseSearchTree [private] |
Definition at line 215 of file DecisionTree.h.
Double_t TMVA::DecisionTree::fPruneStrength [private] |
Definition at line 216 of file DecisionTree.h.
Referenced by GetPruneStrength(), and SetPruneStrength().
EPruneMethod TMVA::DecisionTree::fPruneMethod [private] |
Double_t TMVA::DecisionTree::fNodePurityLimit [private] |
Definition at line 220 of file DecisionTree.h.
Referenced by GetNodePurityLimit(), PruneNode(), and SetNodePurityLimit().
Bool_t TMVA::DecisionTree::fRandomisedTree [private] |
Definition at line 222 of file DecisionTree.h.
Int_t TMVA::DecisionTree::fUseNvars [private] |
Bool_t TMVA::DecisionTree::fUsePoissonNvars [private] |
TRandom3* TMVA::DecisionTree::fMyTrandom [private] |
Definition at line 226 of file DecisionTree.h.
Referenced by GetRandomisedVariables(), and ~DecisionTree().
std::vector< Double_t > TMVA::DecisionTree::fVariableImportance [private] |
UInt_t TMVA::DecisionTree::fNNodesMax [private] |
Definition at line 230 of file DecisionTree.h.
UInt_t TMVA::DecisionTree::fMaxDepth [private] |
Definition at line 231 of file DecisionTree.h.
UInt_t TMVA::DecisionTree::fClass [private] |
Definition at line 232 of file DecisionTree.h.
Referenced by CheckEventWithPrunedTree(), FillEvent(), and GetFisherCoefficients().
static const Int_t TMVA::DecisionTree::fgDebugLevel = 0 [static, private] |
Definition at line 234 of file DecisionTree.h.
Int_t TMVA::DecisionTree::fTreeID [private] |
Definition at line 237 of file DecisionTree.h.
Referenced by DecisionTree(), DoRegression(), GetAnalysisType(), and SetAnalysisType().
SeparationBase* TMVA::DecisionTree::fSepType [private] |
Definition at line 209 of file DecisionTree.h.
RegressionVariance* TMVA::DecisionTree::fRegType [private] |
Definition at line 210 of file DecisionTree.h.
TRandom3* TMVA::DecisionTree::fMyTrandom [private] |
Definition at line 226 of file DecisionTree.h.