#include <CCPruner.h>
Public Types | |
typedef std::vector< Event * > | EventList |
typedef std::vector< Event * > | EventList |
Public Member Functions | |
CCPruner (DecisionTree *t_max, const EventList *validationSample, SeparationBase *qualityIndex=NULL) | |
CCPruner (DecisionTree *t_max, const DataSet *validationSample, SeparationBase *qualityIndex=NULL) | |
~CCPruner () | |
void | SetPruneStrength (Float_t alpha=-1.0) |
void | Optimize () |
std::vector< TMVA::DecisionTreeNode * > | GetOptimalPruneSequence () const |
Float_t | GetOptimalQualityIndex () const |
Float_t | GetOptimalPruneStrength () const |
CCPruner (DecisionTree *t_max, const EventList *validationSample, SeparationBase *qualityIndex=NULL) | |
CCPruner (DecisionTree *t_max, const DataSet *validationSample, SeparationBase *qualityIndex=NULL) | |
~CCPruner () | |
void | SetPruneStrength (Float_t alpha=-1.0) |
void | Optimize () |
std::vector< TMVA::DecisionTreeNode * > | GetOptimalPruneSequence () const |
Float_t | GetOptimalQualityIndex () const |
Float_t | GetOptimalPruneStrength () const |
Private Attributes | |
Float_t | fAlpha |
const EventList * | fValidationSample |
regularization parameter in CC pruning | |
const DataSet * | fValidationDataSet |
the event sample to select the optimally-pruned tree | |
SeparationBase * | fQualityIndex |
the event sample to select the optimally-pruned tree | |
Bool_t | fOwnQIndex |
the quality index used to calculate R(t), R(T) = sum[t in ~T]{ R(t) } | |
DecisionTree * | fTree |
flag indicates if fQualityIndex is owned by this | |
std::vector< TMVA::DecisionTreeNode * > | fPruneSequence |
(pruned) decision tree | |
std::vector< Float_t > | fPruneStrengthList |
map of weakest links (i.e., branches to prune) -> pruning index | |
std::vector< Float_t > | fQualityIndexList |
map of alpha -> pruning index | |
Int_t | fOptimalK |
map of R(T) -> pruning index | |
Bool_t | fDebug |
index of the optimal tree in the pruned tree sequence | |
const EventList * | fValidationSample |
regularization parameter in CC pruning | |
const DataSet * | fValidationDataSet |
the event sample to select the optimally-pruned tree | |
SeparationBase * | fQualityIndex |
the event sample to select the optimally-pruned tree | |
DecisionTree * | fTree |
flag indicates if fQualityIndex is owned by this | |
std::vector< TMVA::DecisionTreeNode * > | fPruneSequence |
(pruned) decision tree | |
std::vector< Float_t > | fPruneStrengthList |
map of weakest links (i.e., branches to prune) -> pruning index | |
std::vector< Float_t > | fQualityIndexList |
map of alpha -> pruning index |
Definition at line 64 of file CCPruner.h.
typedef std::vector<Event*> TMVA::CCPruner::EventList |
Definition at line 66 of file CCPruner.h.
typedef std::vector<Event*> TMVA::CCPruner::EventList |
Definition at line 66 of file CCPruner.h.
CCPruner::CCPruner | ( | DecisionTree * | t_max, | |
const EventList * | validationSample, | |||
SeparationBase * | qualityIndex = NULL | |||
) |
Definition at line 36 of file CCPruner.cxx.
References fDebug, fOwnQIndex, fQualityIndex, fTree, kTRUE, and NULL.
CCPruner::CCPruner | ( | DecisionTree * | t_max, | |
const DataSet * | validationSample, | |||
SeparationBase * | qualityIndex = NULL | |||
) |
Definition at line 58 of file CCPruner.cxx.
References fDebug, fOwnQIndex, fQualityIndex, fTree, kTRUE, and NULL.
CCPruner::~CCPruner | ( | ) |
TMVA::CCPruner::CCPruner | ( | DecisionTree * | t_max, | |
const EventList * | validationSample, | |||
SeparationBase * | qualityIndex = NULL | |||
) |
TMVA::CCPruner::CCPruner | ( | DecisionTree * | t_max, | |
const DataSet * | validationSample, | |||
SeparationBase * | qualityIndex = NULL | |||
) |
TMVA::CCPruner::~CCPruner | ( | ) |
void TMVA::CCPruner::SetPruneStrength | ( | Float_t | alpha = -1.0 |
) | [inline] |
void CCPruner::Optimize | ( | ) |
Definition at line 88 of file CCPruner.cxx.
References RootCsg::epsilon, ROOT::Math::fabs(), fAlpha, fDebug, fOptimalK, fPruneSequence, fPruneStrengthList, fQualityIndex, fQualityIndexList, fTree, fValidationDataSet, fValidationSample, TMVA::CCTreeWrapper::GetRoot(), i, k, min, n, NULL, outfile, TMVA::CCTreeWrapper::PruneNode(), R, t, and TMVA::CCTreeWrapper::TestTreeQuality().
Referenced by TMVA::MethodDT::PruneTree().
std::vector< DecisionTreeNode * > CCPruner::GetOptimalPruneSequence | ( | ) | const |
Definition at line 204 of file CCPruner.cxx.
References fOptimalK, fPruneSequence, and i.
Referenced by TMVA::MethodDT::PruneTree().
Float_t TMVA::CCPruner::GetOptimalQualityIndex | ( | ) | const [inline] |
Float_t TMVA::CCPruner::GetOptimalPruneStrength | ( | ) | const [inline] |
Definition at line 91 of file CCPruner.h.
References fOptimalK, and fPruneStrengthList.
Referenced by TMVA::MethodDT::PruneTree().
void TMVA::CCPruner::SetPruneStrength | ( | Float_t | alpha = -1.0 |
) |
void TMVA::CCPruner::Optimize | ( | ) |
std::vector<TMVA::DecisionTreeNode*> TMVA::CCPruner::GetOptimalPruneSequence | ( | ) | const |
Float_t TMVA::CCPruner::GetOptimalQualityIndex | ( | ) | const [inline] |
Float_t TMVA::CCPruner::GetOptimalPruneStrength | ( | ) | const [inline] |
Float_t TMVA::CCPruner::fAlpha [private] |
const EventList* TMVA::CCPruner::fValidationSample [private] |
regularization parameter in CC pruning
Definition at line 96 of file CCPruner.h.
Referenced by Optimize().
const DataSet* TMVA::CCPruner::fValidationDataSet [private] |
the event sample to select the optimally-pruned tree
Definition at line 97 of file CCPruner.h.
Referenced by Optimize().
SeparationBase* TMVA::CCPruner::fQualityIndex [private] |
the event sample to select the optimally-pruned tree
Definition at line 98 of file CCPruner.h.
Referenced by CCPruner(), Optimize(), and ~CCPruner().
Bool_t TMVA::CCPruner::fOwnQIndex [private] |
the quality index used to calculate R(t), R(T) = sum[t in ~T]{ R(t) }
Definition at line 99 of file CCPruner.h.
Referenced by CCPruner(), and ~CCPruner().
DecisionTree* TMVA::CCPruner::fTree [private] |
flag indicates if fQualityIndex is owned by this
Definition at line 101 of file CCPruner.h.
Referenced by CCPruner(), and Optimize().
std::vector<TMVA::DecisionTreeNode*> TMVA::CCPruner::fPruneSequence [private] |
(pruned) decision tree
Definition at line 103 of file CCPruner.h.
Referenced by GetOptimalPruneSequence(), and Optimize().
std::vector<Float_t> TMVA::CCPruner::fPruneStrengthList [private] |
map of weakest links (i.e., branches to prune) -> pruning index
Definition at line 104 of file CCPruner.h.
Referenced by GetOptimalPruneStrength(), and Optimize().
std::vector<Float_t> TMVA::CCPruner::fQualityIndexList [private] |
map of alpha -> pruning index
Definition at line 105 of file CCPruner.h.
Referenced by GetOptimalQualityIndex(), and Optimize().
Int_t TMVA::CCPruner::fOptimalK [private] |
map of R(T) -> pruning index
Definition at line 107 of file CCPruner.h.
Referenced by GetOptimalPruneSequence(), GetOptimalPruneStrength(), GetOptimalQualityIndex(), and Optimize().
Bool_t TMVA::CCPruner::fDebug [private] |
index of the optimal tree in the pruned tree sequence
Definition at line 108 of file CCPruner.h.
Referenced by CCPruner(), and Optimize().
const EventList* TMVA::CCPruner::fValidationSample [private] |
const DataSet* TMVA::CCPruner::fValidationDataSet [private] |
SeparationBase* TMVA::CCPruner::fQualityIndex [private] |
DecisionTree* TMVA::CCPruner::fTree [private] |
std::vector<TMVA::DecisionTreeNode*> TMVA::CCPruner::fPruneSequence [private] |
std::vector<Float_t> TMVA::CCPruner::fPruneStrengthList [private] |
map of weakest links (i.e., branches to prune) -> pruning index
Definition at line 104 of file CCPruner.h.
std::vector<Float_t> TMVA::CCPruner::fQualityIndexList [private] |