Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::OptimizeConfigParameters Class Reference

Definition at line 49 of file OptimizeConfigParameters.h.

Public Member Functions

 OptimizeConfigParameters (MethodBase *const method, std::map< TString, TMVA::Interval * > tuneParameters, TString fomType="Separation", TString optimizationType="GA")
 Constructor which sets either "Classification or Regression".
 
virtual ~OptimizeConfigParameters ()
 the destructor (delete the OptimizeConfigParameters, store the graph and .. delete it)
 
virtual TClassIsA () const
 
std::map< TString, Double_toptimize ()
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TMVA::IFitterTarget
 IFitterTarget ()
 constructor
 
virtual ~IFitterTarget ()
 
virtual void ProgressNotifier (TString, TString)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TMVA::IFitterTarget
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Public Attributes

friend TestOptimizeConfigParameters
 

Private Member Functions

Double_t EstimatorFunction (std::vector< Double_t > &)
 return the estimator (from current FOM) for the fitting interface
 
Double_t GetBkgEffAtSigEff (Double_t sigEff=0.5)
 calculate the background efficiency for a given signal efficiency
 
Double_t GetBkgRejAtSigEff (Double_t sigEff=0.5)
 calculate the background rejection for a given signal efficiency
 
Double_t GetFOM ()
 Return the Figure of Merit (FOM) used in the parameter optimization process.
 
MethodBaseGetMethod ()
 
void GetMVADists ()
 fill the private histograms with the mva distributions for sig/bkg
 
Double_t GetROCIntegral ()
 calculate the area (integral) under the ROC curve as a overall quality measure of the classification
 
std::vector< intGetScanIndices (int val, std::vector< int > base)
 helper function to scan through the all the combinations in the parameter space
 
Double_t GetSeparation ()
 return the separation between the signal and background MVA ouput distribution
 
Double_t GetSigEffAtBkgEff (Double_t bkgEff=0.1)
 calculate the signal efficiency for a given background efficiency
 
MsgLoggerLog () const
 
void optimizeFit ()
 
void optimizeScan ()
 do the actual optimization using a simple scan method, i.e.
 

Private Attributes

std::map< std::vector< Double_t >, Double_tfAlreadyTrainedParCombination
 save parameters for which the FOM is already known (GA seems to evaluate the same parameters several times)
 
TString fFOMType
 the FOM type (Separation, ROC integra.. whatever you implemented..
 
std::vector< Float_tfFOMvsIter
 graph showing the development of the Figure Of Merit values during the fit
 
MsgLoggerfLogger
 ! message logger
 
MethodBase *const fMethod
 The MVA method to be evaluated.
 
TH1DfMvaBkg
 MVA distribution for bakgr. events, used for spline fit.
 
TH1DfMvaBkgFineBin
 MVA distribution for bakgr. events.
 
TH1DfMvaSig
 MVA distribution for signal events, used for spline fit.
 
TH1DfMvaSigFineBin
 MVA distribution for signal events.
 
Bool_t fNotDoneYet
 flat to indicate of Method Transformations have been obtained yet or not (normally done in MethodBase::TrainMethod)
 
TString fOptimizationFitType
 which type of optimisation procedure to be used
 
std::map< TString, Double_tfTunedParameters
 parameters included in the tuning
 
std::map< TString, TMVA::Interval * > fTuneParameters
 parameters included in the tuning
 

#include <TMVA/OptimizeConfigParameters.h>

Inheritance diagram for TMVA::OptimizeConfigParameters:
[legend]

Constructor & Destructor Documentation

◆ OptimizeConfigParameters()

TMVA::OptimizeConfigParameters::OptimizeConfigParameters ( MethodBase *const  method,
std::map< TString, TMVA::Interval * >  tuneParameters,
TString  fomType = "Separation",
TString  optimizationType = "GA" 
)

Constructor which sets either "Classification or Regression".

Definition at line 60 of file OptimizeConfigParameters.cxx.

◆ ~OptimizeConfigParameters()

TMVA::OptimizeConfigParameters::~OptimizeConfigParameters ( )
virtual

the destructor (delete the OptimizeConfigParameters, store the graph and .. delete it)

Definition at line 96 of file OptimizeConfigParameters.cxx.

Member Function Documentation

◆ Class()

static TClass * TMVA::OptimizeConfigParameters::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TMVA::OptimizeConfigParameters::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TMVA::OptimizeConfigParameters::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 100 of file OptimizeConfigParameters.h.

◆ DeclFileName()

static const char * TMVA::OptimizeConfigParameters::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 100 of file OptimizeConfigParameters.h.

◆ EstimatorFunction()

Double_t TMVA::OptimizeConfigParameters::EstimatorFunction ( std::vector< Double_t > &  pars)
privatevirtual

return the estimator (from current FOM) for the fitting interface

Implements TMVA::IFitterTarget.

Definition at line 307 of file OptimizeConfigParameters.cxx.

◆ GetBkgEffAtSigEff()

Double_t TMVA::OptimizeConfigParameters::GetBkgEffAtSigEff ( Double_t  sigEff = 0.5)
private

calculate the background efficiency for a given signal efficiency

adapted by marc-.nosp@m.oliv.nosp@m.ier.b.nosp@m.ettl.nosp@m.er@ce.nosp@m.rn.c.nosp@m.h

Definition at line 546 of file OptimizeConfigParameters.cxx.

◆ GetBkgRejAtSigEff()

Double_t TMVA::OptimizeConfigParameters::GetBkgRejAtSigEff ( Double_t  sigEff = 0.5)
private

calculate the background rejection for a given signal efficiency

adapted by marc-.nosp@m.oliv.nosp@m.ier.b.nosp@m.ettl.nosp@m.er@ce.nosp@m.rn.c.nosp@m.h

Definition at line 583 of file OptimizeConfigParameters.cxx.

◆ GetFOM()

Double_t TMVA::OptimizeConfigParameters::GetFOM ( )
private

Return the Figure of Merit (FOM) used in the parameter optimization process.

Definition at line 350 of file OptimizeConfigParameters.cxx.

◆ GetMethod()

MethodBase * TMVA::OptimizeConfigParameters::GetMethod ( )
inlineprivate

Definition at line 72 of file OptimizeConfigParameters.h.

◆ GetMVADists()

void TMVA::OptimizeConfigParameters::GetMVADists ( )
private

fill the private histograms with the mva distributions for sig/bkg

Definition at line 393 of file OptimizeConfigParameters.cxx.

◆ GetROCIntegral()

Double_t TMVA::OptimizeConfigParameters::GetROCIntegral ( )
private

calculate the area (integral) under the ROC curve as a overall quality measure of the classification

making pdfs out of the MVA-output distributions doesn't work reliably for cases where the MVA-output isn't a smooth distribution. this happens "frequently" in BDTs for example when the number of trees is small resulting in only some discrete possible MVA output values. (I still leave the code here, but use this with care!!! The default however is to use the distributions!!!

Definition at line 458 of file OptimizeConfigParameters.cxx.

◆ GetScanIndices()

std::vector< int > TMVA::OptimizeConfigParameters::GetScanIndices ( int  val,
std::vector< int base 
)
private

helper function to scan through the all the combinations in the parameter space

Definition at line 149 of file OptimizeConfigParameters.cxx.

◆ GetSeparation()

Double_t TMVA::OptimizeConfigParameters::GetSeparation ( )
private

return the separation between the signal and background MVA ouput distribution

Definition at line 434 of file OptimizeConfigParameters.cxx.

◆ GetSigEffAtBkgEff()

Double_t TMVA::OptimizeConfigParameters::GetSigEffAtBkgEff ( Double_t  bkgEff = 0.1)
private

calculate the signal efficiency for a given background efficiency

Definition at line 509 of file OptimizeConfigParameters.cxx.

◆ IsA()

virtual TClass * TMVA::OptimizeConfigParameters::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented from TMVA::IFitterTarget.

Definition at line 100 of file OptimizeConfigParameters.h.

◆ Log()

MsgLogger & TMVA::OptimizeConfigParameters::Log ( ) const
inlineprivate

Definition at line 98 of file OptimizeConfigParameters.h.

◆ optimize()

std::map< TString, Double_t > TMVA::OptimizeConfigParameters::optimize ( )

Definition at line 127 of file OptimizeConfigParameters.cxx.

◆ optimizeFit()

void TMVA::OptimizeConfigParameters::optimizeFit ( )
private

Definition at line 242 of file OptimizeConfigParameters.cxx.

◆ optimizeScan()

void TMVA::OptimizeConfigParameters::optimizeScan ( )
private

do the actual optimization using a simple scan method, i.e.

calculate the FOM for different tuning paraemters and remember which one is gave the best FOM

Definition at line 164 of file OptimizeConfigParameters.cxx.

◆ Streamer()

virtual void TMVA::OptimizeConfigParameters::Streamer ( TBuffer )
virtual

Reimplemented from TMVA::IFitterTarget.

◆ StreamerNVirtual()

void TMVA::OptimizeConfigParameters::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 100 of file OptimizeConfigParameters.h.

Member Data Documentation

◆ fAlreadyTrainedParCombination

std::map< std::vector<Double_t> , Double_t> TMVA::OptimizeConfigParameters::fAlreadyTrainedParCombination
private

save parameters for which the FOM is already known (GA seems to evaluate the same parameters several times)

Definition at line 86 of file OptimizeConfigParameters.h.

◆ fFOMType

TString TMVA::OptimizeConfigParameters::fFOMType
private

the FOM type (Separation, ROC integra.. whatever you implemented..

Definition at line 87 of file OptimizeConfigParameters.h.

◆ fFOMvsIter

std::vector<Float_t> TMVA::OptimizeConfigParameters::fFOMvsIter
private

graph showing the development of the Figure Of Merit values during the fit

Definition at line 83 of file OptimizeConfigParameters.h.

◆ fLogger

MsgLogger* TMVA::OptimizeConfigParameters::fLogger
mutableprivate

! message logger

Definition at line 97 of file OptimizeConfigParameters.h.

◆ fMethod

MethodBase* const TMVA::OptimizeConfigParameters::fMethod
private

The MVA method to be evaluated.

Definition at line 82 of file OptimizeConfigParameters.h.

◆ fMvaBkg

TH1D* TMVA::OptimizeConfigParameters::fMvaBkg
private

MVA distribution for bakgr. events, used for spline fit.

Definition at line 90 of file OptimizeConfigParameters.h.

◆ fMvaBkgFineBin

TH1D* TMVA::OptimizeConfigParameters::fMvaBkgFineBin
private

MVA distribution for bakgr. events.

Definition at line 93 of file OptimizeConfigParameters.h.

◆ fMvaSig

TH1D* TMVA::OptimizeConfigParameters::fMvaSig
private

MVA distribution for signal events, used for spline fit.

Definition at line 89 of file OptimizeConfigParameters.h.

◆ fMvaSigFineBin

TH1D* TMVA::OptimizeConfigParameters::fMvaSigFineBin
private

MVA distribution for signal events.

Definition at line 92 of file OptimizeConfigParameters.h.

◆ fNotDoneYet

Bool_t TMVA::OptimizeConfigParameters::fNotDoneYet
private

flat to indicate of Method Transformations have been obtained yet or not (normally done in MethodBase::TrainMethod)

Definition at line 95 of file OptimizeConfigParameters.h.

◆ fOptimizationFitType

TString TMVA::OptimizeConfigParameters::fOptimizationFitType
private

which type of optimisation procedure to be used

Definition at line 88 of file OptimizeConfigParameters.h.

◆ fTunedParameters

std::map<TString,Double_t> TMVA::OptimizeConfigParameters::fTunedParameters
private

parameters included in the tuning

Definition at line 85 of file OptimizeConfigParameters.h.

◆ fTuneParameters

std::map<TString,TMVA::Interval*> TMVA::OptimizeConfigParameters::fTuneParameters
private

parameters included in the tuning

Definition at line 84 of file OptimizeConfigParameters.h.

◆ TestOptimizeConfigParameters

friend TMVA::OptimizeConfigParameters::TestOptimizeConfigParameters

Definition at line 52 of file OptimizeConfigParameters.h.

Libraries for TMVA::OptimizeConfigParameters:

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