Logo ROOT  
Reference Guide
TMVA::IPruneTool Class Referenceabstract

IPruneTool - a helper interface class to prune a decision tree

Any tool which implements the interface should provide two modes for tree pruning:

  1. automatically find the "best" prune strength by minimizing the error rate on a test sample if SetAutomatic() is called, or if automatic = kTRUE argument is set in CalculatePruningInfo() In this case, the PruningInfo object returned contains the error rate of the optimally pruned tree, the optimal prune strength, and the sequence of nodes to prune to obtain the optimal pruned tree from the original DecisionTree
  2. a user-provided pruning strength parameter is used to prune the tree, in which case the returned PruningInfo object has QualityIndex = -1, PruneStrength = user prune strength, and PruneSequence is the list of nodes to prune

Definition at line 89 of file IPruneTool.h.

Public Types

typedef std::vector< const Event * > EventSample

Public Member Functions

 IPruneTool ()
virtual ~IPruneTool ()
virtual PruningInfoCalculatePruningInfo (DecisionTree *dt, const EventSample *testEvents=NULL, Bool_t isAutomatic=kFALSE)=0
Double_t GetPruneStrength () const
Bool_t IsAutomatic () const
void SetAutomatic ()
void SetPruneStrength (Double_t alpha)

Protected Attributes

Double_t B
Double_t fPruneStrength
Double_t S
 regularization parameter in pruning More...

#include <TMVA/IPruneTool.h>

Inheritance diagram for TMVA::IPruneTool:

Member Typedef Documentation

◆ EventSample

typedef std::vector<const Event*> TMVA::IPruneTool::EventSample

Definition at line 93 of file IPruneTool.h.

Constructor & Destructor Documentation

◆ IPruneTool()

TMVA::IPruneTool::IPruneTool ( )

Definition at line 126 of file IPruneTool.h.

◆ ~IPruneTool()

TMVA::IPruneTool::~IPruneTool ( )

Definition at line 58 of file ExpectedErrorPruneTool.cxx.

Member Function Documentation

◆ CalculatePruningInfo()

virtual PruningInfo* TMVA::IPruneTool::CalculatePruningInfo ( DecisionTree dt,
const EventSample testEvents = NULL,
Bool_t  isAutomatic = kFALSE 
pure virtual

◆ GetPruneStrength()

Double_t TMVA::IPruneTool::GetPruneStrength ( ) const

Definition at line 109 of file IPruneTool.h.

◆ IsAutomatic()

Bool_t TMVA::IPruneTool::IsAutomatic ( ) const

Definition at line 114 of file IPruneTool.h.

◆ SetAutomatic()

void TMVA::IPruneTool::SetAutomatic ( )

Definition at line 113 of file IPruneTool.h.

◆ SetPruneStrength()

void TMVA::IPruneTool::SetPruneStrength ( Double_t  alpha)

Definition at line 107 of file IPruneTool.h.

Member Data Documentation

◆ B

Double_t TMVA::IPruneTool::B

Definition at line 123 of file IPruneTool.h.

◆ fPruneStrength

Double_t TMVA::IPruneTool::fPruneStrength

Definition at line 120 of file IPruneTool.h.

◆ S

Double_t TMVA::IPruneTool::S

regularization parameter in pruning

Definition at line 123 of file IPruneTool.h.

Libraries for TMVA::IPruneTool:

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