ROOT » TMVA » TMVA::MethodBase

class TMVA::MethodBase: public TMVA::IMethod, public TMVA::Configurable


Virtual base Class for all MVA method MethodBase hosts several specific evaluation methods. The kind of MVA that provides optimal performance in an analysis strongly depends on the particular application. The evaluation factory provides a number of numerical benchmark results to directly assess the performance of the MVA training on the independent test sample. These are: The MVA standard output also prints the linear correlation coefficients between signal and background, which can be useful to eliminate variables that exhibit too strong correlations.
 

Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~MethodBase()
voidTObject::AbstractMethod(const char* method) const
voidTMVA::Configurable::AddOptionsXMLTo(void* parent) const
voidAddOutput(TMVA::Types::ETreeType type, TMVA::Types::EAnalysisType analysisType)
virtual voidTObject::AppendPad(Option_t* option = "")
TDirectory*BaseDir() const
virtual voidTObject::Browse(TBrowser* b)
voidTMVA::Configurable::CheckForUnusedOptions() const
virtual voidCheckSetup()
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 = "")
TMVA::ConfigurableTMVA::Configurable::Configurable(const TMVA::Configurable&)
virtual voidTObject::Copy(TObject& object) const
virtual const TMVA::Ranking*CreateRanking()
TMVA::DataSet*Data() const
TMVA::DataSetInfo&DataInfo() const
virtual voidDeclareCompatibilityOptions()
virtual voidDeclareOptions()
virtual voidTObject::Delete(Option_t* option = "")MENU
voidDisableWriting(Bool_t setter)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
Bool_tDoMulticlass() const
Bool_tDoRegression() const
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
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)
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
TMVA::Types::EAnalysisTypeGetAnalysisType() const
const char*TMVA::Configurable::GetConfigDescription() const
const char*TMVA::Configurable::GetConfigName() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Double_tGetEfficiency(const TString&, TMVA::Types::ETreeType, Double_t& err)
const TMVA::Event*GetEvent() const
const TMVA::Event*GetEvent(const TMVA::Event* ev) const
const TMVA::Event*GetEvent(Long64_t ievt) const
const TMVA::Event*GetEvent(Long64_t ievt, TMVA::Types::ETreeType type) const
const vector<TMVA::Event*>&GetEventCollection(TMVA::Types::ETreeType type)
virtual const char*TObject::GetIconName() const
const TString&GetInputLabel(Int_t i) const
const TString&GetInputTitle(Int_t i) const
const TString&GetInputVar(Int_t i) const
const TString&GetJobName() const
virtual Double_tGetKSTrainingVsTest(Char_t SorB, TString opt = "X")
virtual Double_tGetMaximumSignificance(Double_t SignalEvents, Double_t BackgroundEvents, Double_t& optimal_significance_value) const
Double_tGetMean(Int_t ivar) const
const TString&GetMethodName() const
TMVA::Types::EMVAGetMethodType() const
TStringGetMethodTypeName() const
virtual vector<Float_t>GetMulticlassEfficiency(vector<vector<Float_t> >& purity)
virtual vector<Float_t>GetMulticlassTrainingEfficiency(vector<vector<Float_t> >& purity)
virtual const vector<Float_t>&GetMulticlassValues()
virtual Double_tGetMvaValue(Double_t* errLower = 0, Double_t* errUpper = 0)
Double_tGetMvaValue(const TMVA::Event*const ev, Double_t* err = 0, Double_t* errUpper = 0)
virtual const char*GetName() const
UInt_tGetNEvents() const
UInt_tGetNTargets() const
UInt_tGetNvar() const
UInt_tGetNVariables() 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 Double_tGetProba(const TMVA::Event* ev)
virtual Double_tGetProba(Double_t mvaVal, Double_t ap_sig)
const TStringGetProbaName() const
virtual Double_tGetRarity(Double_t mvaVal, TMVA::Types::ESBType reftype = Types::kBackground) const
virtual voidGetRegressionDeviation(UInt_t tgtNum, TMVA::Types::ETreeType type, Double_t& stddev, Double_t& stddev90Percent) const
virtual const vector<Float_t>&GetRegressionValues()
const vector<Float_t>&GetRegressionValues(const TMVA::Event*const ev)
Double_tGetRMS(Int_t ivar) const
virtual Double_tGetROCIntegral(TH1D* histS, TH1D* histB) const
virtual Double_tGetROCIntegral(TMVA::PDF* pdfS = 0, TMVA::PDF* pdfB = 0) const
virtual Double_tGetSeparation(TH1*, TH1*) const
virtual Double_tGetSeparation(TMVA::PDF* pdfS = 0, TMVA::PDF* pdfB = 0) const
Double_tGetSignalReferenceCut() const
Double_tGetSignalReferenceCutOrientation() const
virtual Double_tGetSignificance() const
const TMVA::Event*GetTestingEvent(Long64_t ievt) const
Double_tGetTestTime() const
const TString&GetTestvarName() const
virtual const char*TObject::GetTitle() const
virtual Double_tGetTrainingEfficiency(const TString&)
const TMVA::Event*GetTrainingEvent(Long64_t ievt) const
UInt_tGetTrainingROOTVersionCode() const
TStringGetTrainingROOTVersionString() const
UInt_tGetTrainingTMVAVersionCode() const
TStringGetTrainingTMVAVersionString() const
Double_tGetTrainTime() const
TMVA::TransformationHandler&GetTransformationHandler(Bool_t takeReroutedIfAvailable = true)
const TMVA::TransformationHandler&GetTransformationHandler(Bool_t takeReroutedIfAvailable = true) const
virtual UInt_tTObject::GetUniqueID() const
TStringGetWeightFileName() const
Double_tGetXmax(Int_t ivar) const
Double_tGetXmin(Int_t ivar) const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual Bool_tTMVA::IMethod::HasAnalysisType(TMVA::Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
virtual ULong_tTObject::Hash() const
Bool_tHasMVAPdfs() const
TMVA::IMethodTMVA::IMethod::IMethod()
TMVA::IMethodTMVA::IMethod::IMethod(const TMVA::IMethod&)
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 voidInit()
virtual voidTObject::Inspect() constMENU
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_tIsSignalLike()
virtual Bool_tIsSignalLike(Double_t mvaVal)
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
virtual voidMakeClass(const TString& classFileName = TString("")) const
voidTObject::MayNotUse(const char* method) const
TMVA::MethodBaseMethodBase(const TMVA::MethodBase&)
TMVA::MethodBaseMethodBase(TMVA::Types::EMVA methodType, TMVA::DataSetInfo& dsi, const TString& weightFile, TDirectory* theBaseDir = 0)
TMVA::MethodBaseMethodBase(const TString& jobName, TMVA::Types::EMVA methodType, const TString& methodTitle, TMVA::DataSetInfo& dsi, const TString& theOption = "", TDirectory* theBaseDir = 0)
TDirectory*MethodBaseDir() const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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)
TMVA::MethodBase&operator=(const TMVA::MethodBase&)
virtual map<TString,Double_t>OptimizeTuningParameters(TString fomType = "ROCIntegral", TString fitType = "FitGA")
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTMVA::Configurable::ParseOptions()
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual voidPrintHelpMessage() const
voidTMVA::Configurable::PrintOptions() const
virtual voidProcessOptions()
voidProcessSetup()
virtual Int_tTObject::Read(const char* name)
voidTMVA::Configurable::ReadOptionsFromStream(istream& istr)
voidTMVA::Configurable::ReadOptionsFromXML(void* node)
voidReadStateFromFile()
voidReadStateFromStream(istream& tf)
voidReadStateFromStream(TFile& rf)
voidReadStateFromXMLString(const char* xmlstr)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidRerouteTransformationHandler(TMVA::TransformationHandler* fTargetTransformation)
virtual voidReset()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidSetAnalysisType(TMVA::Types::EAnalysisType type)
voidSetBaseDir(TDirectory* methodDir)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTMVA::Configurable::SetConfigDescription(const char* d)
voidTMVA::Configurable::SetConfigName(const char* n)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetMethodBaseDir(TDirectory* methodDir)
voidSetMethodDir(TDirectory* methodDir)
voidTMVA::Configurable::SetMsgType(TMVA::EMsgType t)
static voidTObject::SetObjectStat(Bool_t stat)
voidTMVA::Configurable::SetOptions(const TString& s)
voidSetSignalReferenceCut(Double_t cut)
voidSetSignalReferenceCutOrientation(Double_t cutOrientation)
voidSetTestTime(Double_t testTime)
voidSetTestvarName(const TString& v = "")
voidSetTrainTime(Double_t trainTime)
virtual voidSetTuneParameters(map<TString,Double_t> tuneParameters)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetupMethod()
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTestClassification()
virtual voidTestMulticlass()
virtual voidTestRegression(Double_t& bias, Double_t& biasT, Double_t& dev, Double_t& devT, Double_t& rms, Double_t& rmsT, Double_t& mInf, Double_t& mInfT, Double_t& corr, TMVA::Types::ETreeType type)
virtual voidTrain()
voidTrainMethod()
virtual voidTObject::UseCurrentStyle()
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
virtual voidWriteEvaluationHistosToFile(TMVA::Types::ETreeType treetype)
virtual voidWriteMonitoringHistosToFile() const
voidTMVA::Configurable::WriteOptionsToStream(ostream& o, const TString& prefix) const
voidWriteStateToFile() const
protected:
virtual voidAddWeightsXMLTo(void* parent) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTMVA::Configurable::EnableLooseOptions(Bool_t b = kTRUE)
virtual voidTMVA::IMethod::GetHelpMessage() const
const TString&GetInternalVarName(Int_t ivar) const
const TString&GetOriginalVarName(Int_t ivar) const
const TString&TMVA::Configurable::GetReferenceFile() const
static TMVA::MethodBase*GetThisBase()
const TString&GetWeightFileDir() const
Bool_tHasTrainingTree() const
Bool_tHelp() const
Bool_tIgnoreEventsWithNegWeightsInTraining() const
Bool_tIsConstructedFromWeightFile() const
Bool_tIsNormalised() const
TMVA::MsgLogger&TMVA::Configurable::Log() const
Bool_tTMVA::Configurable::LooseOptionCheckingEnabled() const
virtual voidMakeClassSpecific(ostream&, const TString& = "") const
virtual voidMakeClassSpecificHeader(ostream&, const TString& = "") const
voidTObject::MakeZombie()
voidNoErrorCalc(Double_t*const err, Double_t*const errUpper)
virtual voidReadWeightsFromStream(istream&)
virtual voidReadWeightsFromStream(TFile&)
virtual voidReadWeightsFromXML(void* wghtnode)
voidTMVA::Configurable::ResetSetFlag()
voidSetNormalised(Bool_t norm)
voidSetWeightFileDir(TString fileDir)
voidSetWeightFileName(TString)
voidStatistics(TMVA::Types::ETreeType treeType, const TString& theVarName, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&)
Bool_tTxtWeightsOnly() const
Bool_tVerbose() const
voidTMVA::Configurable::WriteOptionsReferenceToFile()
private:
voidAddClassesXMLTo(void* parent) const
virtual voidAddClassifierOutput(TMVA::Types::ETreeType type)
virtual voidAddClassifierOutputProb(TMVA::Types::ETreeType type)
voidAddInfoItem(void* gi, const TString& name, const TString& value) const
virtual voidAddMulticlassOutput(TMVA::Types::ETreeType type)
virtual voidAddRegressionOutput(TMVA::Types::ETreeType type)
voidAddSpectatorsXMLTo(void* parent) const
voidAddTargetsXMLTo(void* parent) const
voidAddVarsXMLTo(void* parent) const
voidCreateMVAPdfs()
static voidCreateVariableTransforms(const TString& trafoDefinition, TMVA::DataSetInfo& dataInfo, TMVA::TransformationHandler& transformationHandler, TMVA::MsgLogger& log)
voidDeclareBaseOptions()
TMVA::MethodBase::ECutOrientationGetCutOrientation() const
Double_tGetEffForRoot(Double_t)
Bool_tGetLine(istream& fin, char* buf)
static TMVA::MethodBase*&GetThisBaseThreadLocal()
static Double_tIGetEffForRoot(Double_t)
voidInitBase()
voidProcessBaseOptions()
voidReadClassesFromXML(void* clsnode)
voidReadSpectatorsFromXML(void* specnode)
voidReadStateFromXML(void* parent)
voidReadTargetsFromXML(void* tarnode)
voidReadVariablesFromXML(void* varnode)
voidReadVarsFromStream(istream& istr)
voidResetThisBase()
voidWriteStateToStream(ostream& tf) const
voidWriteStateToXML(void* parent) const
voidWriteVarsToStream(ostream& tf, const TString& prefix = "") const

Data Members

public:
Bool_tfSetupCompletedis method setup
const TMVA::Event*fTmpEvent! temporary event when testing on a different DataSet than the own one
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TMVA::MethodBase::EWeightFileTypekROOT
static TObject::(anonymous)TObject::kSingleKey
static TMVA::MethodBase::EWeightFileTypekTEXT
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
TMVA::Types::EAnalysisTypefAnalysisTypemethod-mode : true --> regression, false --> classification
UInt_tfBackgroundClassindex of the Background-class
vector<TString>*fInputVarsvector of input variables used in MVA
vector<Float_t>*fMulticlassReturnValholds the return-values for the multiclass classification
Int_tfNbinsnumber of bins in input variable histograms
Int_tfNbinsHnumber of bins in evaluation histograms
Int_tfNbinsMVAoutputnumber of bins in MVA output histograms
TMVA::Ranking*fRankingpointer to ranking object (created by derived classifiers)
vector<Float_t>*fRegressionReturnValholds the return-values for the regression
UInt_tfSignalClassindex of the Signal-class
private:
TDirectory*fBaseDirbase directory for the instance, needed to know where to jump back from localDir
Bool_tfConstructedFromWeightFileis it obtained from weight file?
TMVA::MethodBase::ECutOrientationfCutOrientation+1 if Sig>Bkg, -1 otherwise
TMVA::DataSetInfo&fDataSetInfo! the data set information (sometimes needed)
TMVA::PDF*fDefaultPDFdefault PDF definitions
Bool_tfDisableWriting! set to true in order to suppress writing to XML
TH1*fEffSefficiency histogram for rootfinder
vector<const vector<TMVA::Event*>*>fEventCollectionsif the method needs the complete event-collection, the transformed event coll. ist stored here.
TStringfFileDirunix sub-directory for weight files (default: "weights")
Bool_tfHasMVAPdfsMVA Pdfs are created for this classifier
Bool_tfHelphelp flag
Bool_tfIgnoreNegWeightsInTrainingIf true, events with negative weights are not used in training
TStringfJobNamename of job -> user defined, appears in weight files
TMVA::PDF*fMVAPdfBbackground MVA PDF
TMVA::PDF*fMVAPdfSsignal MVA PDF
Double_tfMeanBmean (background)
Double_tfMeanSmean (signal)
TDirectory*fMethodBaseDirbase directory for the method
TStringfMethodNamename of the method (set in derived class)
TMVA::Types::EMVAfMethodTypetype of method (set in derived class)
Int_tfNbinsMVAPdfnumber of bins used in histogram that creates PDF
Bool_tfNormalisenormalise input variables
Int_tfNsmoothMVAPdfnumber of times a histogram is smoothed before creating the PDF
TStringfParentDirmethod parent name, like booster name
UInt_tfROOTTrainingVersionROOT version used for training
Double_tfRmsBRMS (background)
Double_tfRmsSRMS (signal)
Double_tfSignalReferenceCutminimum requirement on the MVA output to declare an event signal-like
Double_tfSignalReferenceCutOrientationminimum requirement on the MVA output to declare an event signal-like
TMVA::PDF*fSplBPDFs of MVA distribution (background)
TMVA::TSpline1*fSplRefBhelper splines for RootFinder (background)
TMVA::TSpline1*fSplRefShelper splines for RootFinder (signal)
TMVA::PDF*fSplSPDFs of MVA distribution (signal)
TMVA::PDF*fSplTrainBPDFs of training MVA distribution (background)
TSpline*fSplTrainEffBvsSsplines for training signal eff. versus background eff.
TMVA::TSpline1*fSplTrainRefBhelper splines for RootFinder (background)
TMVA::TSpline1*fSplTrainRefShelper splines for RootFinder (signal)
TMVA::PDF*fSplTrainSPDFs of training MVA distribution (signal)
TSpline*fSpleffBvsSsplines for signal eff. versus background eff.
UInt_tfTMVATrainingVersionTMVA version used for training
Double_tfTestTimefor timing measurements
TStringfTestvarvariable used in evaluation, etc (mostly the MVA)
Double_tfTrainTimefor timing measurements
TMVA::TransformationHandlerfTransformationthe list of transformations
TMVA::TransformationHandler*fTransformationPointerpointer to the rest of transformations
Bool_tfTxtWeightsOnlyif TRUE, write weights only to text files
Bool_tfUseDecorrsynonymous for decorrelation
TStringfVarTransformStringlabels variable transform method
TMVA::Types::ESBTypefVariableTransformTypethis is the event type (sig or bgd) assumed for variable transform
TStringfVariableTransformTypeStringlabels variable transform type
Bool_tfVerboseverbose flag
TMVA::EMsgTypefVerbosityLevelverbosity level
TStringfVerbosityLevelStringverbosity level (user input string)
TStringfWeightFileweight file name
Double_tfXmaxmaximum (signal and background)
Double_tfXminminimum (signal and background)
static TMVA::MethodBase::ECutOrientationkNegative
static TMVA::MethodBase::ECutOrientationkPositive

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

MethodBase(const TString& jobName, TMVA::Types::EMVA methodType, const TString& methodTitle, TMVA::DataSetInfo& dsi, const TString& theOption = "", TDirectory* theBaseDir = 0)
 standard constructur
MethodBase(TMVA::Types::EMVA methodType, TMVA::DataSetInfo& dsi, const TString& weightFile, TDirectory* theBaseDir = 0)
 constructor used for Testing + Application of the MVA,
 only (no training), using given WeightFiles
~MethodBase( void )
 destructor
void SetupMethod()
 setup of methods
void ProcessSetup()
 process all options
 the "CheckForUnusedOptions" is done in an independent call, since it may be overridden by derived class
 (sometimes, eg, fitters are used which can only be implemented during training phase)
void CheckSetup()
 check may be overridden by derived class
 (sometimes, eg, fitters are used which can only be implemented during training phase)
void InitBase()
 default initialization called by all constructors
void DeclareBaseOptions()
 define the options (their key words) that can be set in the option string
 here the options valid for ALL MVA methods are declared.
 know options: VariableTransform=None,Decorrelated,PCA  to use transformed variables
                                                        instead of the original ones
               VariableTransformType=Signal,Background  which decorrelation matrix to use
                                                        in the method. Only the Likelihood
                                                        Method can make proper use of independent
                                                        transformations of signal and background
               fNbinsMVAPdf   = 50 Number of bins used to create a PDF of MVA
               fNsmoothMVAPdf =  2 Number of times a histogram is smoothed before creating the PDF
               fHasMVAPdfs         create PDFs for the MVA outputs
               V                   for Verbose output (!V) for non verbos
               H                   for Help message
void ProcessBaseOptions()
 the option string is decoded, for availabel options see "DeclareOptions"
void CreateVariableTransforms(const TString& trafoDefinition, TMVA::DataSetInfo& dataInfo, TMVA::TransformationHandler& transformationHandler, TMVA::MsgLogger& log)
 create variable transformations
void DeclareCompatibilityOptions()
 options that are used ONLY for the READER to ensure backward compatibility
   they are hence without any effect (the reader is only reading the training
   options that HAD been used at the training of the .xml weightfile at hand
std::map<TString,Double_t> OptimizeTuningParameters(TString fomType = "ROCIntegral", TString fitType = "FitGA")
 call the Optimzier with the set of paremeters and ranges that
 are meant to be tuned.
void SetTuneParameters(map<TString,Double_t> tuneParameters)
 set the tuning parameters accoding to the argument
 This is just a dummy .. have a look at the MethodBDT how you could
 perhaps implment the same thing for the other Classifiers..
void TrainMethod()
void GetRegressionDeviation(UInt_t tgtNum, TMVA::Types::ETreeType type, Double_t& stddev, Double_t& stddev90Percent) const
void AddRegressionOutput(TMVA::Types::ETreeType type)
 prepare tree branch with the method's discriminating variable
void AddMulticlassOutput(TMVA::Types::ETreeType type)
 prepare tree branch with the method's discriminating variable
void NoErrorCalc(Double_t*const err, Double_t*const errUpper)
Double_t GetMvaValue(const TMVA::Event*const ev, Double_t* err = 0, Double_t* errUpper = 0)
Bool_t IsSignalLike()
 uses a pre-set cut on the MVA output (SetSignalReferenceCut and SetSignalReferenceCutOrientation)
 for a quick determination if an event would be selected as signal or background
Bool_t IsSignalLike(Double_t mvaVal)
 uses a pre-set cut on the MVA output (SetSignalReferenceCut and SetSignalReferenceCutOrientation)
 for a quick determination if an event with this mva output value would tbe selected as signal or background
void AddClassifierOutput(TMVA::Types::ETreeType type)
 prepare tree branch with the method's discriminating variable
void AddClassifierOutputProb(TMVA::Types::ETreeType type)
 prepare tree branch with the method's discriminating variable
void TestRegression(Double_t& bias, Double_t& biasT, Double_t& dev, Double_t& devT, Double_t& rms, Double_t& rmsT, Double_t& mInf, Double_t& mInfT, Double_t& corr, TMVA::Types::ETreeType type)
 calculate <sum-of-deviation-squared> of regression output versus "true" value from test sample

   bias = average deviation
   dev  = average absolute deviation
   rms  = rms of deviation

void TestMulticlass()
 test multiclass classification
void TestClassification()
 initialization
void WriteStateToStream(ostream& tf) const
 general method used in writing the header of the weight files where
 the used variables, variable transformation type etc. is specified
void AddInfoItem(void* gi, const TString& name, const TString& value) const
 xml writing
void AddOutput(TMVA::Types::ETreeType type, TMVA::Types::EAnalysisType analysisType)
void WriteStateToXML(void* parent) const
 general method used in writing the header of the weight files where
 the used variables, variable transformation type etc. is specified
void ReadStateFromStream(TFile& rf)
 write reference MVA distributions (and other information)
 to a ROOT type weight file
void WriteStateToFile() const
 write options and weights to file
 note that each one text file for the main configuration information
 and one ROOT file for ROOT objects are created
void ReadStateFromFile()
 Function to write options and weights to file
void ReadStateFromXMLString(const char* xmlstr)
 for reading from memory
void ReadStateFromXML(void* parent)
void ReadStateFromStream(istream& tf)
 read the header from the weight files of the different MVA methods
void WriteVarsToStream(ostream& tf, const TString& prefix = "") const
 write the list of variables (name, min, max) for a given data
 transformation method to the stream
void ReadVarsFromStream(istream& istr)
 Read the variables (name, min, max) for a given data
 transformation method from the stream. In the stream we only
 expect the limits which will be set
void AddVarsXMLTo(void* parent) const
 write variable info to XML
void AddSpectatorsXMLTo(void* parent) const
 write spectator info to XML
void AddClassesXMLTo(void* parent) const
 write class info to XML
void AddTargetsXMLTo(void* parent) const
 write target info to XML
void ReadVariablesFromXML(void* varnode)
 read variable info from XML
void ReadSpectatorsFromXML(void* specnode)
 read spectator info from XML
void ReadClassesFromXML(void* clsnode)
 read number of classes from XML
void ReadTargetsFromXML(void* tarnode)
 read target info from XML
TDirectory* BaseDir() const
 returns the ROOT directory where info/histograms etc of the
 corresponding MVA method instance are stored
TDirectory* MethodBaseDir() const
 returns the ROOT directory where all instances of the
 corresponding MVA method are stored
void SetWeightFileDir(TString fileDir)
 set directory of weight file
void SetWeightFileName(TString )
 set the weight file name (depreciated)
TString GetWeightFileName() const
 retrieve weight file name
void WriteEvaluationHistosToFile(TMVA::Types::ETreeType treetype)
 writes all MVA evaluation histograms to file
void WriteMonitoringHistosToFile( void )
 write special monitoring histograms to file
 dummy implementation here -----------------
Bool_t GetLine(istream& fin, char* buf)
 reads one line from the input stream
 checks for certain keywords and interprets
 the line if keywords are found
void CreateMVAPdfs()
 Create PDFs of the MVA output variables
Double_t GetProba(const TMVA::Event* ev)
 the simple one, automatically calcualtes the mvaVal and uses the
 SAME sig/bkg ratio as given in the training sample (typically 50/50
 .. (NormMode=EqualNumEvents) but can be different)
Double_t GetProba(Double_t mvaVal, Double_t ap_sig)
 compute likelihood ratio
Double_t GetRarity(Double_t mvaVal, TMVA::Types::ESBType reftype = Types::kBackground) const
 compute rarity:
 R(x) = Integrate_[-oo..x] { PDF(x') dx' }
 where PDF(x) is the PDF of the classifier's signal or background distribution
Double_t GetEfficiency(const TString& , TMVA::Types::ETreeType , Double_t& err)
 fill background efficiency (resp. rejection) versus signal efficiency plots
 returns signal efficiency at background efficiency indicated in theString
Double_t GetTrainingEfficiency(const TString& )
std::vector<Float_t> GetMulticlassEfficiency(vector<vector<Float_t> >& purity)
std::vector<Float_t> GetMulticlassTrainingEfficiency(vector<vector<Float_t> >& purity)
Double_t GetSignificance( void )
 compute significance of mean difference
 significance = |<S> - <B>|/Sqrt(RMS_S2 + RMS_B2)
Double_t GetSeparation(TH1* , TH1* ) const
 compute "separation" defined as
 <s2> = (1/2) Int_-oo..+oo { (S(x) - B(x))^2/(S(x) + B(x)) dx }
Double_t GetSeparation(TMVA::PDF* pdfS = 0, TMVA::PDF* pdfB = 0) const
 compute "separation" defined as
 <s2> = (1/2) Int_-oo..+oo { (S(x) - B(x))^2/(S(x) + B(x)) dx }
Double_t GetROCIntegral(TH1D* histS, TH1D* histB) const
 calculate the area (integral) under the ROC curve as a
 overall quality measure of the classification
Double_t GetROCIntegral(TMVA::PDF* pdfS = 0, TMVA::PDF* pdfB = 0) const
 calculate the area (integral) under the ROC curve as a
 overall quality measure of the classification
Double_t GetMaximumSignificance(Double_t SignalEvents, Double_t BackgroundEvents, Double_t& optimal_significance_value) const
 plot significance, S/Sqrt(S^2 + B^2), curve for given number
 of signal and background events; returns cut for maximum significance
 also returned via reference is the maximum significance
void Statistics(TMVA::Types::ETreeType treeType, const TString& theVarName, Double_t& , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& )
 calculates rms,mean, xmin, xmax of the event variable
 this can be either done for the variables as they are or for
 normalised variables (in the range of 0-1) if "norm" is set to kTRUE
void MakeClass(const TString& classFileName = TString("")) const
 create reader class for method (classification only at present)
void PrintHelpMessage() const
 prints out method-specific help method
Double_t IGetEffForRoot(Double_t )
 interface for RootFinder
Double_t GetEffForRoot(Double_t )
 returns efficiency as function of cut
const std::vector<TMVA::Event*>& GetEventCollection(TMVA::Types::ETreeType type)
 returns the event collection (i.e. the dataset) TRANSFORMED using the
   classifiers specific Variable Transformation (e.g. Decorr or Decorr:Gauss:Decorr)
TString GetTrainingTMVAVersionString() const
 calculates the TMVA version string from the training version code on the fly
TString GetTrainingROOTVersionString() const
 calculates the ROOT version string from the training version code on the fly
TMVA::MethodBase* GetThisBase()
 return a pointer the base class of this method
void ResetThisBase()
 reset required for RootFinder
Double_t GetKSTrainingVsTest(Char_t SorB, TString opt = "X")
const TMVA::Event* GetEvent(const TMVA::Event* ev) const
const TMVA::Event* GetEvent() const
const TMVA::Event* GetEvent(Long64_t ievt) const
const TMVA::Event* GetEvent(Long64_t ievt, TMVA::Types::ETreeType type) const
const TMVA::Event* GetTrainingEvent(Long64_t ievt) const
const TMVA::Event* GetTestingEvent(Long64_t ievt) const
MethodBase(const TString& jobName, TMVA::Types::EMVA methodType, const TString& methodTitle, TMVA::DataSetInfo& dsi, const TString& theOption = "", TDirectory* theBaseDir = 0)
 default constructur
void Train()
void SetTrainTime(Double_t trainTime)
 store and retrieve time used for training
{ fTrainTime = trainTime; }
Double_t GetTrainTime() const
{ return fTrainTime; }
void SetTestTime(Double_t testTime)
 store and retrieve time used for testing
{ fTestTime = testTime; }
Double_t GetTestTime() const
{ return fTestTime; }
void Init()
 options treatment
void DeclareOptions()
void ProcessOptions()
void Reset()
 reset the Method --> As if it was not yet trained, just instantiated
      virtual void     Reset()          = 0;
for the moment, I provide a dummy (that would not work) default, just to make
 compilation/running w/o parameter optimisation still possible
{return;}
Double_t GetMvaValue(Double_t* errLower = 0, Double_t* errUpper = 0)
 classifier response:
 some methods may return a per-event error estimate
 error calculation is skipped if err==0
const std::vector<Float_t>& GetRegressionValues(const TMVA::Event*const ev)
 regression response
const std::vector<Float_t>& GetRegressionValues()
const std::vector<Float_t>& GetMulticlassValues()
 multiclass classification response
const Ranking* CreateRanking()
 create ranking
void AddWeightsXMLTo(void* parent) const
 the actual "weights"
void ReadWeightsFromXML(void* wghtnode)
void ReadWeightsFromStream(istream& )
void ReadWeightsFromStream(TFile& )
{}
const TString& GetJobName() const
 ---------- public accessors -----------------------------------------------
 classifier naming (a lot of names ... aren't they ;-)
{ return fJobName; }
const TString& GetMethodName() const
{ return fMethodName; }
TString GetMethodTypeName() const
{ return Types::Instance().GetMethodName(fMethodType); }
Types::EMVA GetMethodType() const
{ return fMethodType; }
const char* GetName() const
{ return fMethodName.Data(); }
const TString& GetTestvarName() const
{ return fTestvar; }
const TString GetProbaName() const
{ return fTestvar + "_Proba"; }
void SetTestvarName(const TString& v = "")
 build classifier name in Test tree
 MVA prefix (e.g., "TMVA_")
{ fTestvar = (v=="") ? ("MVA_" + GetMethodName()) : v; }
UInt_t GetNvar() const
 number of input variable used by classifier
{ return DataInfo().GetNVariables(); }
UInt_t GetNVariables() const
{ return DataInfo().GetNVariables(); }
UInt_t GetNTargets() const
{ return DataInfo().GetNTargets(); }
const TString& GetInputVar(Int_t i) const
 internal names and expressions of input variables
{ return DataInfo().GetVariableInfo(i).GetInternalName(); }
const TString& GetInputLabel(Int_t i) const
{ return DataInfo().GetVariableInfo(i).GetLabel(); }
const TString& GetInputTitle(Int_t i) const
{ return DataInfo().GetVariableInfo(i).GetTitle(); }
Double_t GetMean(Int_t ivar) const
 normalisation and limit accessors
{ return GetTransformationHandler().GetMean(ivar); }
Double_t GetRMS(Int_t ivar) const
{ return GetTransformationHandler().GetRMS(ivar); }
Double_t GetXmin(Int_t ivar) const
{ return GetTransformationHandler().GetMin(ivar); }
Double_t GetXmax(Int_t ivar) const
{ return GetTransformationHandler().GetMax(ivar); }
Double_t GetSignalReferenceCut() const
 sets the minimum requirement on the MVA output to declare an event signal-like
Double_t GetSignalReferenceCutOrientation() const
void SetSignalReferenceCut(Double_t cut)
 sets the minimum requirement on the MVA output to declare an event signal-like
void SetSignalReferenceCutOrientation(Double_t cutOrientation)
{ fSignalReferenceCutOrientation = cutOrientation; }
void SetMethodDir(TDirectory* methodDir)
{ fBaseDir = fMethodBaseDir = methodDir; }
void SetBaseDir(TDirectory* methodDir)
{ fBaseDir = methodDir; }
void SetMethodBaseDir(TDirectory* methodDir)
{ fMethodBaseDir = methodDir; }
UInt_t GetTrainingTMVAVersionCode() const
 the TMVA version can be obtained and checked using
    if (GetTrainingTMVAVersionCode()>TMVA_VERSION(3,7,2)) {...}
 or
    if (GetTrainingROOTVersionCode()>ROOT_VERSION(5,15,5)) {...}
UInt_t GetTrainingROOTVersionCode() const
TransformationHandler& GetTransformationHandler(Bool_t takeReroutedIfAvailable = true)
const TransformationHandler& GetTransformationHandler(Bool_t takeReroutedIfAvailable = true) const
void RerouteTransformationHandler(TMVA::TransformationHandler* fTargetTransformation)
{ fTransformationPointer=fTargetTransformation; }
DataSetInfo& DataInfo() const
{ return fDataSetInfo; }
UInt_t GetNEvents() const
 event reference and update
 NOTE: these Event accessors make sure that you get the events transformed according to the
        particular clasifiers transformation chosen
{ return Data()->GetNEvents(); }
Bool_t HasMVAPdfs() const
{ return fHasMVAPdfs; }
void SetAnalysisType(TMVA::Types::EAnalysisType type)
{ fAnalysisType = type; }
Types::EAnalysisType GetAnalysisType() const
{ return fAnalysisType; }
Bool_t DoRegression() const
{ return fAnalysisType == Types::kRegression; }
Bool_t DoMulticlass() const
{ return fAnalysisType == Types::kMulticlass; }
void DisableWriting(Bool_t setter)
 setter method for suppressing writing to XML and writing of standalone classes
{ fDisableWriting = setter; }
const TString& GetWeightFileDir() const
{ return fFileDir; }
Bool_t IsNormalised() const
 are input variables normalised ?
{ return fNormalise; }
void SetNormalised(Bool_t norm)
{ fNormalise = norm; }
Bool_t Verbose() const
 set number of input variables (only used by MethodCuts, could perhaps be removed)
      void SetNvar( Int_t n ) { fNvar = n; }
 verbose and help flags
{ return fVerbose; }
Bool_t Help() const
{ return fHelp; }
const TString& GetInternalVarName(Int_t ivar) const
 ---------- protected event and tree accessors -----------------------------
 names of input variables (if the original names are expressions, they are
 transformed into regexps)
{ return (*fInputVars)[ivar]; }
const TString& GetOriginalVarName(Int_t ivar) const
{ return DataInfo().GetVariableInfo(ivar).GetExpression(); }
Bool_t HasTrainingTree() const
{ return Data()->GetNTrainingEvents() != 0; }
void MakeClassSpecific(ostream& , const TString& = "") const
 ---------- protected auxiliary methods ------------------------------------
 make ROOT-independent C++ class for classifier response (classifier-specific implementation)
{}
void MakeClassSpecificHeader(ostream& , const TString& = "") const
 header and auxiliary classes
{}
Bool_t TxtWeightsOnly() const
 if TRUE, write weights only to text files
{ return kTRUE; }
Bool_t IsConstructedFromWeightFile() const
 access to event information that needs method-specific information
ECutOrientation GetCutOrientation() const
{ return fCutOrientation; }
Bool_t IgnoreEventsWithNegWeightsInTraining() const
MethodBase*& GetThisBaseThreadLocal()
 This is a workaround for OSx where static thread_local data members are
 not supported. The C++ solution would indeed be the following:
{TTHREAD_TLS(MethodBase*) fgThisBase(nullptr); return fgThisBase; }