Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 70 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
 

#include <TMVA/IPruneTool.h>

Inheritance diagram for TMVA::IPruneTool:
[legend]

Member Typedef Documentation

◆ EventSample

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

Definition at line 74 of file IPruneTool.h.

Constructor & Destructor Documentation

◆ IPruneTool()

TMVA::IPruneTool::IPruneTool ( )
inline

Definition at line 107 of file IPruneTool.h.

◆ ~IPruneTool()

TMVA::IPruneTool::~IPruneTool ( )
virtual

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
inline

Definition at line 90 of file IPruneTool.h.

◆ IsAutomatic()

Bool_t TMVA::IPruneTool::IsAutomatic ( ) const
inline

Definition at line 95 of file IPruneTool.h.

◆ SetAutomatic()

void TMVA::IPruneTool::SetAutomatic ( )
inline

Definition at line 94 of file IPruneTool.h.

◆ SetPruneStrength()

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

Definition at line 88 of file IPruneTool.h.

Member Data Documentation

◆ B

Double_t TMVA::IPruneTool::B
protected

Definition at line 104 of file IPruneTool.h.

◆ fPruneStrength

Double_t TMVA::IPruneTool::fPruneStrength
protected

Definition at line 101 of file IPruneTool.h.

◆ S

Double_t TMVA::IPruneTool::S
protected

regularization parameter in pruning

Definition at line 104 of file IPruneTool.h.

Libraries for TMVA::IPruneTool:

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