40#ifndef ROOT_TMVA_Factory
41#define ROOT_TMVA_Factory
104 template <
typename T,
typename = std::enable_if_t<std::is_constructible_v<TString, T &&>>>
196 TH1F*
GetImportance(
const int nbits,std::vector<Double_t> importances,std::vector<TString> varNames);
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
#define ClassDefOverride(name, id)
Describe directory structure in memory.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
1-D histogram with a float per channel (see TH1 documentation)
Configurable(const TString &theOption="")
constructor
Class that contains all the data information.
Class that contains all the data information.
MethodName(Types::EMVA method)
TString const & tString() const
void PrintHelpMessage(const TString &datasetname, const TString &methodTitle="") const
Print predefined help message of classifier.
Bool_t fSilentFile
! used in constructor without file
Bool_t fCorrelations
! enable to calculate correlations
Bool_t IsModelPersistence() const
TString fOptions
! option string given by construction (presently only "V")
std::vector< IMethod * > MVector
void TrainAllMethods()
Iterates through all booked methods and calls training.
friend class CrossValidation
Bool_t Verbose(void) const
void WriteDataInformation(DataSetInfo &fDataSetInfo)
Factory(TString theJobName, TFile *theTargetFile, TString theOption="")
Standard constructor.
void TestAllMethods()
Evaluates all booked methods on the testing data and adds the output to the Results in the corresponi...
void TrainAllMethodsForClassification(void)
Bool_t fVerbose
! verbose mode
void EvaluateAllMethods(void)
Iterates over all MVAs that have been booked, and calls their evaluation methods.
TH1F * EvaluateImportanceRandom(DataLoader *loader, UInt_t nseeds, Types::EMVA theMethod, TString methodTitle, const char *theOption="")
TH1F * GetImportance(const int nbits, std::vector< Double_t > importances, std::vector< TString > varNames)
Bool_t fROC
! enable to calculate ROC values
void EvaluateAllVariables(DataLoader *loader, TString options="")
Iterates over all MVA input variables and evaluates them.
TDirectory * RootBaseDir()
TString fVerboseLevel
! verbosity level, controls granularity of logging
TMultiGraph * GetROCCurveAsMultiGraph(DataLoader *loader, UInt_t iClass, Types::ETreeType type=Types::kTesting)
Generate a collection of graphs, for all methods for a given class.
TH1F * EvaluateImportance(DataLoader *loader, VIType vitype, Types::EMVA theMethod, TString methodTitle, const char *theOption="")
Evaluate Variable Importance.
void OptimizeAllMethodsForRegression(TString fomType="ROCIntegral", TString fitType="FitGA")
Double_t GetROCIntegral(DataLoader *loader, TString theMethodName, UInt_t iClass=0, Types::ETreeType type=Types::kTesting)
Calculate the integral of the ROC curve, also known as the area under curve (AUC),...
std::map< TString, MVector * > fMethodsMap
void SetInputTreesFromEventAssignTrees()
virtual ~Factory()
Destructor.
MethodBase * BookMethod(DataLoader *loader, MethodName theMethodName, TString methodTitle, TString theOption="")
Books an MVA classifier or regression method.
virtual void MakeClass(const TString &datasetname, const TString &methodTitle="") const
MethodBase * BookMethodWeightfile(DataLoader *dataloader, TMVA::Types::EMVA methodType, const TString &weightfile)
Adds an already constructed method to be managed by this factory.
Bool_t fModelPersistence
! option to save the trained model in xml file or using serialization
std::map< TString, Double_t > OptimizeAllMethods(TString fomType="ROCIntegral", TString fitType="FitGA")
Iterates through all booked methods and sees if they use parameter tuning and if so does just that,...
void OptimizeAllMethodsForClassification(TString fomType="ROCIntegral", TString fitType="FitGA")
ROCCurve * GetROC(DataLoader *loader, TString theMethodName, UInt_t iClass=0, Types::ETreeType type=Types::kTesting)
Private method to generate a ROCCurve instance for a given method.
Bool_t IsSilentFile() const
TH1F * EvaluateImportanceShort(DataLoader *loader, Types::EMVA theMethod, TString methodTitle, const char *theOption="")
Types::EAnalysisType fAnalysisType
! the training type
TString fJobName
! jobname, used as extension in weight file names
Bool_t HasMethod(const TString &datasetname, const TString &title) const
Checks whether a given method name is defined for a given dataset.
TGraph * GetROCCurve(DataLoader *loader, TString theMethodName, Bool_t setTitles=kTRUE, UInt_t iClass=0, Types::ETreeType type=Types::kTesting)
Argument iClass specifies the class to generate the ROC curve in a multiclass setting.
void TrainAllMethodsForRegression(void)
TH1F * EvaluateImportanceAll(DataLoader *loader, Types::EMVA theMethod, TString methodTitle, const char *theOption="")
void SetVerbose(Bool_t v=kTRUE)
TFile * fgTargetFile
! ROOT output file
std::vector< TMVA::VariableTransformBase * > fDefaultTrfs
! list of transformations on default DataSet
IMethod * GetMethod(const TString &datasetname, const TString &title) const
Returns pointer to MVA that corresponds to given method title.
void DeleteAllMethods(void)
Delete methods.
TString fTransformations
! list of transformations to test
void Greetings()
Print welcome message.
Interface for all concrete MVA method implementations.
Virtual base Class for all MVA method.
Singleton class for Global types used by TMVA.
A TTree represents a columnar dataset.
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
create variable transformations