class TMVA::Factory: public TMVA::Configurable


Factory

This is the main MVA steering class: it creates all MVA methods, and
guides them through the training, testing and evaluation phases


Function Members (Methods)

public:
virtual~Factory()
voidTObject::AbstractMethod(const char* method) const
voidAddBackgroundTree(TTree* background, Double_t weight = 1.0)
voidAddSignalTree(TTree* signal, Double_t weight = 1.0)
voidAddVariable(const TString& expression, char type = 'F', Double_t min = 0, Double_t max = 0)
virtual voidTObject::AppendPad(Option_t* option = "")
Bool_tBookMethod(TString theMethodName, TString methodTitle, TString theOption = "")
Bool_tBookMethod(TMVA::Types::EMVA theMethod, TString methodTitle, TString theOption = "")
Bool_tBookMethod(TMVA::Types::EMVA theMethod, TString methodTitle, TString methodOption, TMVA::Types::EMVA theCommittee, TString committeeOption = "")
virtual voidTObject::Browse(TBrowser* b)
voidTMVA::Configurable::CheckForUnusedOptions() const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
TMVA::ConfigurableTMVA::Configurable::Configurable(const TString& theOption = "")
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")
voidDeleteAllMethods()
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
voidEvaluateAllMethods()
voidEvaluateAllVariables(TString options = "")
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
TMVA::FactoryFactory(TString theJobName, TFile* theTargetFile, TString theOption = "")
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TMVA::IMethod*GetMethod(const TString& title) const
virtual const char*GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const TString&TMVA::Configurable::GetOptions() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
virtual voidMakeClass(const TString& methodTitle = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
voidTMVA::Configurable::ParseOptions(Bool_t verbose = kTRUE)
virtual voidTObject::Pop()
voidPrepareTrainingAndTestTree(TCut cut, const TString& splitOpt = "NsigTrain=3000:NbkgTrain=3000:SplitMode=Random")
voidPrepareTrainingAndTestTree(TCut cut, Int_t Ntrain, Int_t Ntest = -1)
voidPrepareTrainingAndTestTree(TCut sigcut, TCut bkgcut, const TString& splitOpt = "NsigTrain=3000:NbkgTrain=3000:SplitMode=Random")
voidPrepareTrainingAndTestTree(TCut cut, Int_t NsigTrain, Int_t NbkgTrain, Int_t NsigTest, Int_t NbkgTest, const TString& otherOpt = "SplitMode=Random:!V")
virtual voidTObject::Print(Option_t* option = "") const
voidPrintHelpMessage(const TString& methodTitle = "") const
voidTMVA::Configurable::PrintOptions() const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetBackgroundTree(TTree* background, Double_t weight = 1.0)
voidSetBackgroundWeightExpression(const TString& variable)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
Bool_tSetInputTrees(TTree* inputTree, TCut SigCut, TCut BgCut = "")
Bool_tSetInputTrees(TString signalFileName, TString backgroundFileName, Double_t signalWeight = 1.0, Double_t backgroundWeight = 1.0)
Bool_tSetInputTrees(TTree* signal, TTree* background, Double_t signalWeight = 1.0, Double_t backgroundWeight = 1.0)
voidSetInputVariables(vector<TString>* theVariables)
voidTMVA::Configurable::SetName(const char* n)
static voidTObject::SetObjectStat(Bool_t stat)
voidTMVA::Configurable::SetOptions(const TString& s)
voidSetSignalTree(TTree* signal, Double_t weight = 1.0)
voidSetSignalWeightExpression(const TString& variable)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetVerbose(Bool_t v = kTRUE)
voidSetWeightExpression(const TString& variable)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
voidTestAllMethods()
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidTrainAllMethods()
virtual voidTObject::UseCurrentStyle()
Bool_tVerbose() const
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
TMVA::DataSet&Data() const
TMVA::DataSet&Data()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTMVA::Configurable::EnableLooseOptions(Bool_t b = kTRUE)
Bool_tTMVA::Configurable::LooseOptionCheckingEnabled() const
voidTObject::MakeZombie()
voidTMVA::Configurable::ReadOptionsFromStream(istream& istr)
voidTMVA::Configurable::ResetSetFlag()
voidTMVA::Configurable::WriteOptionsToStream(ostream& o, const TString& prefix) const
private:
voidGreetings()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
public:
TMVA::MsgLoggerTMVA::Configurable::fLoggermessage logger
private:
Bool_tfColorcolor mode
TMVA::DataSet*fDataSetthe dataset
vector<TTreeFormula*>fInputVarFormulaslocal forulas of the same
TStringfJobNamejobname, used as extension in weight file names
TDirectory*fLocalTDir
vector<IMethod*>fMethodsall MVA methods
TStringfOptionsoption string given by construction (presently only "V")
Bool_tfSilentsilent: no output at all
TFile*fTargetFileROOT output file
Bool_tfVerboseverbose mode

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Factory(TString theJobName, TFile* theTargetFile, TString theOption = "")
 standard constructor
   jobname       : this name will appear in all weight file names produced by the MVAs
   theTargetFile : output ROOT file; the test tree and all evaluation plots
                   will be stored here
   theOption     : option string; currently: "V" for verbose
void Greetings()
 print welcome message
 options are: kLogoWelcomeMsg, kIsometricWelcomeMsg, kLeanWelcomeMsg
~Factory( void )
 default destructor
void DeleteAllMethods( void )
 delete methods
void SetInputVariables(vector<TString>* theVariables)
 fill input variables in data set
Bool_t SetInputTrees(TTree* signal, TTree* background, Double_t signalWeight, Double_t backgroundWeight)
 define the input trees for signal and background; no cuts are applied
Bool_t SetInputTrees(TTree* inputTree, TCut SigCut, TCut BgCut = "")
 define the input trees for signal and background from single input tree,
 containing both signal and background events distinguished by the type
 identifiers: SigCut and BgCut
Bool_t SetInputTrees( TString datFileS, TString datFileB, Double_t signalWeight, Double_t backgroundWeight )
 create trees from these ascii files
void PrepareTrainingAndTestTree(TCut cut, Int_t NsigTrain, Int_t NbkgTrain, Int_t NsigTest, Int_t NbkgTest, const TString& otherOpt = "SplitMode=Random:!V")
 prepare the training and test trees
void PrepareTrainingAndTestTree( TCut cut, Int_t Ntrain, Int_t Ntest )
 prepare the training and test trees
 kept for backward compatibility
void PrepareTrainingAndTestTree(TCut cut, const TString& splitOpt = "NsigTrain=3000:NbkgTrain=3000:SplitMode=Random")
 prepare the training and test trees
void PrepareTrainingAndTestTree( TCut sigcut, TCut bkgcut, const TString& splitOpt )
 prepare the training and test trees
void SetSignalTree(TTree* signal, Double_t weight = 1.0)
 number of signal events (used to compute significance)
void AddSignalTree(TTree* signal, Double_t weight = 1.0)
 number of signal events (used to compute significance)
void SetBackgroundTree(TTree* background, Double_t weight = 1.0)
 number of background events (used to compute significance)
void AddBackgroundTree(TTree* background, Double_t weight = 1.0)
 number of background events (used to compute significance)
Bool_t BookMethod( TString theMethodName, TString methodTitle, TString theOption )
 booking via name; the names are translated into enums and the
 corresponding overloaded BookMethod is called
Bool_t BookMethod( Types::EMVA theMethod, TString methodTitle, TString theOption )
 books MVA method; the option configuration string is custom for each MVA
 the TString field "theNameAppendix" serves to define (and distringuish)
 several instances of a given MVA, eg, when one wants to compare the
 performance of various configurations
Bool_t BookMethod(TMVA::Types::EMVA theMethod, TString methodTitle, TString methodOption, TMVA::Types::EMVA theCommittee, TString committeeOption = "")
 books MVA method; the option configuration string is custom for each MVA
 the TString field "theNameAppendix" serves to define (and distringuish)
 several instances of a given MVA, eg, when one wants to compare the
 performance of various configurations
TMVA::IMethod* GetMethod(const TString& title) const
 returns pointer to MVA that corresponds to given method title
void TrainAllMethods( void )
 iterates over all MVAs that have been booked, and calls their training methods
void TestAllMethods( void )
 iterates over all MVAs that have been booked, and calls their testing methods
void MakeClass(const TString& methodTitle = "") const
 Print predefined help message of classifier
 iterate over methods and test
void PrintHelpMessage(const TString& methodTitle = "") const
 Print predefined help message of classifier
 iterate over methods and test
void EvaluateAllVariables(TString options = "")
 iterates over all MVA input varables and evaluates them
void EvaluateAllMethods( void )
 iterates over all MVAs that have been booked, and calls their evaluation methods
const char* GetName()
* Create signal and background trees from individual ascii files
* note that the format of the file must be the following:
*
*    myVar1/D:myVar2[2]/F:myVar3/I:myString/S
*    3.1415  6.24   56.14   18   UmmmYeah
*    4.31534 7.4555 9.1466  8    OhWell
*    ...
* The first line says to make a tree with 4 branches.
* The 1st branch will be called "myVar1"   and will contain a Double_t.
* The 2nd branch will be called "myVar2"   and will contain a TArrayF.
* The 3rd branch will be called "myVar3"   and will contain an Int_t.
* The 4th branch will be called "myString" and will contain a TObjString.

{ return "Factory"; }
void AddVariable(const TString& expression, char type = 'F', Double_t min = 0, Double_t max = 0)
void SetWeightExpression(const TString& variable)
SetSignalWeightExpression(const TString& variable)
SetBackgroundWeightExpression(const TString& variable)
Data()
Data()
Bool_t Verbose( void )
{ return fVerbose; }
void SetVerbose(Bool_t v = kTRUE)
{ fVerbose = v; Data().SetVerbose(Verbose()); }

Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
Last update: root/tmva $Id: Factory.h 21079 2007-11-27 20:08:49Z brun $
Copyright (c) 2005: *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.