TMVA::MethodCommittee Class Reference

#include <MethodCommittee.h>

Inheritance diagram for TMVA::MethodCommittee:

TMVA::MethodBase TMVA::MethodBase TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod List of all members.

Public Member Functions

 MethodCommittee (const TString &jobName, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption, TDirectory *theTargetDir=0)
 MethodCommittee (DataSetInfo &theData, const TString &theWeightFile, TDirectory *theTargetDir=0)
virtual ~MethodCommittee (void)
virtual Bool_t HasAnalysisType (Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
void WriteStateToFile () const
void Train ()
void AddWeightsXMLTo (void *parent) const
void ReadWeightsFromStream (istream &istr)
void ReadWeightsFromXML (void *)
void WriteMonitoringHistosToFile (void) const
Double_t GetMvaValue (Double_t *err=0, Double_t *errUpper=0)
Double_t Boost (TMVA::MethodBase *, UInt_t imember)
const RankingCreateRanking ()
void DeclareOptions ()
void ProcessOptions ()
const std::vector< TMVA::IMethod * > & GetCommittee () const
const std::vector< Double_t > & GetBoostWeights () const
std::vector< Double_tGetVariableImportance ()
Double_t GetVariableImportance (UInt_t ivar)
 MethodCommittee (const TString &jobName, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption, TDirectory *theTargetDir=0)
 MethodCommittee (DataSetInfo &theData, const TString &theWeightFile, TDirectory *theTargetDir=0)
virtual ~MethodCommittee (void)
virtual Bool_t HasAnalysisType (Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
void WriteStateToFile () const
void Train ()
void AddWeightsXMLTo (void *parent) const
void ReadWeightsFromStream (istream &istr)
void ReadWeightsFromXML (void *)
void WriteMonitoringHistosToFile (void) const
Double_t GetMvaValue (Double_t *err=0, Double_t *errUpper=0)
Double_t Boost (TMVA::MethodBase *, UInt_t imember)
const RankingCreateRanking ()
void DeclareOptions ()
void ProcessOptions ()
const std::vector< TMVA::IMethod * > & GetCommittee () const
const std::vector< Double_t > & GetBoostWeights () const
std::vector< Double_tGetVariableImportance ()
Double_t GetVariableImportance (UInt_t ivar)

Protected Member Functions

void MakeClassSpecific (std::ostream &, const TString &) const
void GetHelpMessage () const
void MakeClassSpecific (std::ostream &, const TString &) const
void GetHelpMessage () const

Private Member Functions

std::vector< IMethod * > & GetCommittee ()
std::vector< Double_t > & GetBoostWeights ()
Double_t AdaBoost (MethodBase *)
Double_t Bagging (UInt_t imember)
void Init (void)
std::vector< IMethod * > & GetCommittee ()
std::vector< Double_t > & GetBoostWeights ()
Double_t AdaBoost (MethodBase *)
Double_t Bagging (UInt_t imember)
void Init (void)

Private Attributes

UInt_t fNMembers
std::vector< IMethod * > fCommittee
std::vector< Double_tfBoostWeights
TString fBoostType
Types::EMVA fMemberType
TString fMemberOption
Bool_t fUseMemberDecision
Bool_t fUseWeightedMembers
TH1FfBoostFactorHist
TH2FfErrFractHist
TTreefMonitorNtuple
Int_t fITree
Double_t fBoostFactor
Double_t fErrorFraction
Int_t fNnodes
std::vector< Double_tfVariableImportance
std::vector< IMethod * > fCommittee
std::vector< Double_tfBoostWeights
TH1FfBoostFactorHist
TH2FfErrFractHist
TTreefMonitorNtuple

Detailed Description

Definition at line 55 of file MethodCommittee.h.


Constructor & Destructor Documentation

TMVA::MethodCommittee::MethodCommittee ( const TString jobName,
const TString methodTitle,
DataSetInfo dsi,
const TString theOption,
TDirectory theTargetDir = 0 
)

TMVA::MethodCommittee::MethodCommittee ( DataSetInfo theData,
const TString theWeightFile,
TDirectory theTargetDir = 0 
)

Definition at line 88 of file MethodCommittee.cxx.

TMVA::MethodCommittee::~MethodCommittee ( void   )  [virtual]

Definition at line 167 of file MethodCommittee.cxx.

References fCommittee, GetCommittee(), and i.

TMVA::MethodCommittee::MethodCommittee ( const TString jobName,
const TString methodTitle,
DataSetInfo dsi,
const TString theOption,
TDirectory theTargetDir = 0 
)

TMVA::MethodCommittee::MethodCommittee ( DataSetInfo theData,
const TString theWeightFile,
TDirectory theTargetDir = 0 
)

virtual TMVA::MethodCommittee::~MethodCommittee ( void   )  [virtual]


Member Function Documentation

Bool_t TMVA::MethodCommittee::HasAnalysisType ( Types::EAnalysisType  type,
UInt_t  numberClasses,
UInt_t  numberTargets 
) [virtual]

Implements TMVA::IMethod.

Definition at line 109 of file MethodCommittee.cxx.

References TMVA::Types::kClassification, kFALSE, TMVA::Types::kRegression, and kTRUE.

void TMVA::MethodCommittee::WriteStateToFile (  )  const

Reimplemented from TMVA::MethodBase.

Definition at line 175 of file MethodCommittee.cxx.

References Endl, TMVA::MethodBase::GetWeightFileName(), TMVA::kFATAL, TMVA::kINFO, TMVA::Configurable::Log(), and TMVA::MethodBase::WriteStateToStream().

void TMVA::MethodCommittee::Train (  )  [virtual]

Implements TMVA::MethodBase.

Definition at line 194 of file MethodCommittee.cxx.

References TMVA::ClassifierFactory::Create(), TMVA::MethodBase::DataInfo(), Endl, TTree::Fill(), fMemberOption, fMemberType, fMonitorNtuple, fNMembers, GetBoostWeights(), GetCommittee(), TMVA::MethodBase::GetJobName(), TMVA::MethodBase::GetMethodName(), TMVA::MethodBase::GetName(), TMVA::Types::Instance(), TMVA::ClassifierFactory::Instance(), TMVA::kINFO, TMVA::Configurable::Log(), method, and timer.

void TMVA::MethodCommittee::AddWeightsXMLTo ( void *  parent  )  const [virtual]

Implements TMVA::MethodBase.

Definition at line 368 of file MethodCommittee.cxx.

References Endl, TMVA::kFATAL, and TMVA::Configurable::Log().

void TMVA::MethodCommittee::ReadWeightsFromStream ( istream &  istr  ) 

Definition at line 373 of file MethodCommittee.cxx.

References TMVA::ClassifierFactory::Create(), TMVA::MethodBase::DataInfo(), dummy, Endl, fMemberType, fNMembers, GetBoostWeights(), GetCommittee(), TMVA::MethodBase::GetMethodName(), i, TMVA::Types::Instance(), TMVA::ClassifierFactory::Instance(), TMVA::kFATAL, TMVA::Configurable::Log(), m, and method.

void TMVA::MethodCommittee::ReadWeightsFromXML ( void *   )  [inline, virtual]

Implements TMVA::MethodBase.

Definition at line 88 of file MethodCommittee.h.

void TMVA::MethodCommittee::WriteMonitoringHistosToFile ( void   )  const [virtual]

Reimplemented from TMVA::MethodBase.

Definition at line 450 of file MethodCommittee.cxx.

References TMVA::MethodBase::BaseDir(), TDirectory::cd(), Endl, fBoostFactorHist, fErrFractHist, fMonitorNtuple, TDirectory::GetPath(), TMVA::kINFO, TMVA::Configurable::Log(), TObject::Write(), and TTree::Write().

Double_t TMVA::MethodCommittee::GetMvaValue ( Double_t err = 0,
Double_t errUpper = 0 
) [virtual]

Implements TMVA::MethodBase.

Definition at line 414 of file MethodCommittee.cxx.

References fUseMemberDecision, fUseWeightedMembers, GetBoostWeights(), GetCommittee(), m, TMVA::MethodBase::NoErrorCalc(), and norm().

Double_t TMVA::MethodCommittee::Boost ( TMVA::MethodBase ,
UInt_t  imember 
)

Definition at line 228 of file MethodCommittee.cxx.

References AdaBoost(), Bagging(), Endl, fBoostType, TMVA::Configurable::GetOptions(), TMVA::kFATAL, TMVA::kINFO, TMVA::Configurable::Log(), and method.

const TMVA::Ranking * TMVA::MethodCommittee::CreateRanking (  )  [virtual]

Implements TMVA::MethodBase.

Definition at line 498 of file MethodCommittee.cxx.

References TMVA::Ranking::AddRank(), TMVA::MethodBase::fRanking, TMVA::MethodBase::GetInputLabel(), TMVA::MethodBase::GetName(), and TMVA::MethodBase::GetNvar().

void TMVA::MethodCommittee::DeclareOptions (  )  [virtual]

Implements TMVA::MethodBase.

Definition at line 118 of file MethodCommittee.cxx.

References TMVA::Configurable::AddPreDefVal(), TMVA::Configurable::DeclareOptionRef(), fBoostType, fNMembers, fUseMemberDecision, fUseWeightedMembers, kFALSE, and kTRUE.

void TMVA::MethodCommittee::ProcessOptions (  )  [virtual]

Implements TMVA::MethodBase.

Definition at line 140 of file MethodCommittee.cxx.

References TTree::Branch(), fBoostFactor, fBoostFactorHist, fErrFractHist, fErrorFraction, fITree, fMonitorNtuple, and fNMembers.

const std::vector<TMVA::IMethod*>& TMVA::MethodCommittee::GetCommittee (  )  const [inline]

Definition at line 107 of file MethodCommittee.h.

References fCommittee.

Referenced by AdaBoost(), GetMvaValue(), ReadWeightsFromStream(), Train(), and ~MethodCommittee().

const std::vector<Double_t>& TMVA::MethodCommittee::GetBoostWeights (  )  const [inline]

Definition at line 108 of file MethodCommittee.h.

References fBoostWeights.

Referenced by GetMvaValue(), ReadWeightsFromStream(), and Train().

vector< Double_t > TMVA::MethodCommittee::GetVariableImportance (  ) 

Definition at line 465 of file MethodCommittee.cxx.

References fVariableImportance, and TMVA::MethodBase::GetNvar().

Referenced by GetVariableImportance().

Double_t TMVA::MethodCommittee::GetVariableImportance ( UInt_t  ivar  ) 

Definition at line 487 of file MethodCommittee.cxx.

References Endl, GetVariableImportance(), TMVA::kFATAL, and TMVA::Configurable::Log().

void TMVA::MethodCommittee::MakeClassSpecific ( std::ostream &  ,
const TString  
) const [protected, virtual]

Reimplemented from TMVA::MethodBase.

Definition at line 514 of file MethodCommittee.cxx.

void TMVA::MethodCommittee::GetHelpMessage (  )  const [protected, virtual]

Implements TMVA::IMethod.

Definition at line 522 of file MethodCommittee.cxx.

References TMVA::Tools::Color(), Endl, TMVA::gTools(), and TMVA::Configurable::Log().

std::vector<IMethod*>& TMVA::MethodCommittee::GetCommittee (  )  [inline, private]

Definition at line 125 of file MethodCommittee.h.

References fCommittee.

std::vector<Double_t>& TMVA::MethodCommittee::GetBoostWeights (  )  [inline, private]

Definition at line 126 of file MethodCommittee.h.

References fBoostWeights.

Double_t TMVA::MethodCommittee::AdaBoost ( MethodBase  )  [private]

Definition at line 245 of file MethodCommittee.cxx.

References TMVA::MethodBase::Data(), TMVA::MethodBase::DataInfo(), Endl, fBoostFactor, fBoostFactorHist, fErrFractHist, fErrorFraction, TH2::Fill(), TH1::Fill(), TMVA::Event::GetBoostWeight(), GetCommittee(), TMVA::DataSet::GetEvent(), TMVA::DataSet::GetNTrainingEvents(), i, TMVA::MethodBase::IsSignalLike(), kFALSE, TMVA::kFATAL, kTRUE, TMath::Log(), TMVA::Configurable::Log(), method, TMath::Power(), TMVA::Event::SetBoostWeight(), and size.

Referenced by Boost().

Double_t TMVA::MethodCommittee::Bagging ( UInt_t  imember  )  [private]

Definition at line 339 of file MethodCommittee.cxx.

References TMVA::MethodBase::Data(), TMVA::DataSet::GetEvent(), TMVA::DataSet::GetNTrainingEvents(), TRandom3::Rndm(), and TMVA::Event::SetBoostWeight().

Referenced by Boost().

void TMVA::MethodCommittee::Init ( void   )  [private, virtual]

Implements TMVA::MethodBase.

Definition at line 155 of file MethodCommittee.cxx.

References fBoostType, fBoostWeights, fCommittee, and fNMembers.

virtual Bool_t TMVA::MethodCommittee::HasAnalysisType ( Types::EAnalysisType  type,
UInt_t  numberClasses,
UInt_t  numberTargets 
) [virtual]

Implements TMVA::IMethod.

void TMVA::MethodCommittee::WriteStateToFile (  )  const

Reimplemented from TMVA::MethodBase.

void TMVA::MethodCommittee::Train (  )  [virtual]

Implements TMVA::MethodBase.

void TMVA::MethodCommittee::AddWeightsXMLTo ( void *  parent  )  const [virtual]

Implements TMVA::MethodBase.

void TMVA::MethodCommittee::ReadWeightsFromStream ( istream &  istr  ) 

void TMVA::MethodCommittee::ReadWeightsFromXML ( void *   )  [inline, virtual]

Implements TMVA::MethodBase.

Definition at line 88 of file MethodCommittee.h.

void TMVA::MethodCommittee::WriteMonitoringHistosToFile ( void   )  const [virtual]

Reimplemented from TMVA::MethodBase.

Double_t TMVA::MethodCommittee::GetMvaValue ( Double_t err = 0,
Double_t errUpper = 0 
) [virtual]

Implements TMVA::MethodBase.

Double_t TMVA::MethodCommittee::Boost ( TMVA::MethodBase ,
UInt_t  imember 
)

const Ranking* TMVA::MethodCommittee::CreateRanking (  )  [virtual]

Implements TMVA::MethodBase.

void TMVA::MethodCommittee::DeclareOptions (  )  [virtual]

Implements TMVA::MethodBase.

void TMVA::MethodCommittee::ProcessOptions (  )  [virtual]

Implements TMVA::MethodBase.

const std::vector<TMVA::IMethod*>& TMVA::MethodCommittee::GetCommittee (  )  const [inline]

Definition at line 107 of file MethodCommittee.h.

References fCommittee.

const std::vector<Double_t>& TMVA::MethodCommittee::GetBoostWeights (  )  const [inline]

Definition at line 108 of file MethodCommittee.h.

References fBoostWeights.

std::vector<Double_t> TMVA::MethodCommittee::GetVariableImportance (  ) 

Double_t TMVA::MethodCommittee::GetVariableImportance ( UInt_t  ivar  ) 

void TMVA::MethodCommittee::MakeClassSpecific ( std::ostream &  ,
const TString  
) const [protected, virtual]

Reimplemented from TMVA::MethodBase.

void TMVA::MethodCommittee::GetHelpMessage (  )  const [protected, virtual]

Implements TMVA::IMethod.

std::vector<IMethod*>& TMVA::MethodCommittee::GetCommittee (  )  [inline, private]

Definition at line 125 of file MethodCommittee.h.

References fCommittee.

std::vector<Double_t>& TMVA::MethodCommittee::GetBoostWeights (  )  [inline, private]

Definition at line 126 of file MethodCommittee.h.

References fBoostWeights.

Double_t TMVA::MethodCommittee::AdaBoost ( MethodBase  )  [private]

Double_t TMVA::MethodCommittee::Bagging ( UInt_t  imember  )  [private]

void TMVA::MethodCommittee::Init ( void   )  [private, virtual]

Implements TMVA::MethodBase.


Member Data Documentation

UInt_t TMVA::MethodCommittee::fNMembers [private]

Definition at line 134 of file MethodCommittee.h.

Referenced by DeclareOptions(), Init(), ProcessOptions(), ReadWeightsFromStream(), and Train().

std::vector<IMethod*> TMVA::MethodCommittee::fCommittee [private]

Definition at line 135 of file MethodCommittee.h.

Referenced by GetCommittee(), Init(), and ~MethodCommittee().

std::vector<Double_t> TMVA::MethodCommittee::fBoostWeights [private]

Definition at line 136 of file MethodCommittee.h.

Referenced by GetBoostWeights(), and Init().

TString TMVA::MethodCommittee::fBoostType [private]

Definition at line 137 of file MethodCommittee.h.

Referenced by Boost(), DeclareOptions(), and Init().

Types::EMVA TMVA::MethodCommittee::fMemberType [private]

Definition at line 140 of file MethodCommittee.h.

Referenced by ReadWeightsFromStream(), and Train().

TString TMVA::MethodCommittee::fMemberOption [private]

Definition at line 141 of file MethodCommittee.h.

Referenced by Train().

Bool_t TMVA::MethodCommittee::fUseMemberDecision [private]

Definition at line 143 of file MethodCommittee.h.

Referenced by DeclareOptions(), and GetMvaValue().

Bool_t TMVA::MethodCommittee::fUseWeightedMembers [private]

Definition at line 146 of file MethodCommittee.h.

Referenced by DeclareOptions(), and GetMvaValue().

TH1F* TMVA::MethodCommittee::fBoostFactorHist [private]

Definition at line 153 of file MethodCommittee.h.

Referenced by AdaBoost(), ProcessOptions(), and WriteMonitoringHistosToFile().

TH2F* TMVA::MethodCommittee::fErrFractHist [private]

Definition at line 154 of file MethodCommittee.h.

Referenced by AdaBoost(), ProcessOptions(), and WriteMonitoringHistosToFile().

TTree* TMVA::MethodCommittee::fMonitorNtuple [private]

Definition at line 155 of file MethodCommittee.h.

Referenced by ProcessOptions(), Train(), and WriteMonitoringHistosToFile().

Int_t TMVA::MethodCommittee::fITree [private]

Definition at line 156 of file MethodCommittee.h.

Referenced by ProcessOptions().

Double_t TMVA::MethodCommittee::fBoostFactor [private]

Definition at line 157 of file MethodCommittee.h.

Referenced by AdaBoost(), and ProcessOptions().

Double_t TMVA::MethodCommittee::fErrorFraction [private]

Definition at line 158 of file MethodCommittee.h.

Referenced by AdaBoost(), and ProcessOptions().

Int_t TMVA::MethodCommittee::fNnodes [private]

Definition at line 159 of file MethodCommittee.h.

std::vector< Double_t > TMVA::MethodCommittee::fVariableImportance [private]

Definition at line 161 of file MethodCommittee.h.

Referenced by GetVariableImportance().

std::vector<IMethod*> TMVA::MethodCommittee::fCommittee [private]

Definition at line 135 of file MethodCommittee.h.

std::vector<Double_t> TMVA::MethodCommittee::fBoostWeights [private]

Definition at line 136 of file MethodCommittee.h.

TH1F* TMVA::MethodCommittee::fBoostFactorHist [private]

Definition at line 153 of file MethodCommittee.h.

TH2F* TMVA::MethodCommittee::fErrFractHist [private]

Definition at line 154 of file MethodCommittee.h.

TTree* TMVA::MethodCommittee::fMonitorNtuple [private]

Definition at line 155 of file MethodCommittee.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 17:01:27 2011 for ROOT_528-00b_version by  doxygen 1.5.1