53 "Option to save the trained model in xml file or using serialization");
55 "\"Transformations=I;D;P;U;G,D\", for identity, "
56 "decorrelation, PCA, Uniform and Gaussianisation followed by "
57 "decorrelation transformations");
128 fDataLoader = std::shared_ptr<DataLoader>(dataloader);
165 if (meth.GetValue<
TString>(
"MethodName") == methodName && meth.GetValue<
TString>(
"MethodTitle") == methodTitle) {
166 Log() << kFATAL <<
"Booking failed since method with title <" << methodTitle <<
"> already exists "
171 fMethod[
"MethodName"] = methodName;
172 fMethod[
"MethodTitle"] = methodTitle;
173 fMethod[
"MethodOptions"] = options;
195 DeclareOptionRef(color,
"Color",
"Flag for coloured screen output (default: True, if in batch mode: False)");
197 "Draw progress bar to display training, testing and evaluation schedule (default: True)");
198 DeclareOptionRef(silent,
"Silent",
"Batch mode: boolean silent flag inhibiting any output from TMVA after the "
199 "creation of the factory class object (default: False)");
205 Log().SetMinType(kVERBOSE);
223 if (meth.GetValue<
TString>(
"MethodName") == methodname && meth.GetValue<
TString>(
"MethodTitle") == methodtitle)
252 for (UInt_t cls = 0; cls < fDataSetInfo.
GetNClasses(); cls++) {
293 std::vector<TMVA::TransformationHandler *> trfs;
297 std::vector<TString>::iterator trfsDefIt = trfsDef.begin();
298 for (; trfsDefIt != trfsDef.end(); ++trfsDefIt) {
303 Log() << kDEBUG <<
"current transformation string: '" << trfS.
Data() <<
"'" <<
Endl;
307 identityTrHandler = trfs.back();
313 std::vector<TMVA::TransformationHandler *>::iterator trfIt = trfs.begin();
315 for (; trfIt != trfs.end(); ++trfIt) {
318 (*trfIt)->CalcTransformations(inputEvents);
320 if (identityTrHandler)
324 for (trfIt = trfs.begin(); trfIt != trfs.end(); ++trfIt)
bool Bool_t
Boolean (0=false, 1=true) (bool).
TMatrixT< Double_t > TMatrixD
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Service class for 2-D histogram classes.
void SetDrawProgressBar(Bool_t d)
void SetUseColor(Bool_t uc)
OptionBase * DeclareOptionRef(T &ref, const TString &name, const TString &desc="")
Configurable(const TString &theOption="")
constructor
virtual void ParseOptions()
options parser
const TString & GetOptions() const
void CheckForUnusedOptions() const
checks for unused options in option string
Class that contains all the data information.
const TMatrixD * CorrelationMatrix(const TString &className) const
UInt_t GetNClasses() const
DataSet * GetDataSet() const
returns data set
TH2 * CreateCorrelationMatrixHist(const TMatrixD *m, const TString &hName, const TString &hTitle) const
const char * GetName() const override
Returns name of object.
ClassInfo * GetClassInfo(Int_t clNum) const
const std::vector< Event * > & GetEventCollection(Types::ETreeType type=Types::kMaxTreeType) const
Bool_t HasMethod(TString methodname, TString methodtitle)
function to check methods booked
~Envelope()
Default destructor.
void ParseOptions() override
Method to parse the internal option string.
Bool_t IsModelPersistence()
Method to see if the algorithm model is saved in xml or serialized files.
TDirectory * RootBaseDir()
Utility method to get base dir directory from current file.
std::shared_ptr< TFile > fFile
! file to save the results
DataLoader * GetDataLoader()
Method to get the pointer to TMVA::DataLoader object.
Bool_t fModelPersistence
! flag to save the trained model
Bool_t IsSilentFile()
Method to see if a file is available to save results.
void SetDataLoader(DataLoader *dalaloader)
Method to set the pointer to TMVA::DataLoader object.
virtual void BookMethod(TString methodname, TString methodtitle, TString options="")
Method to book the machine learning method to perform the algorithm.
std::vector< OptionMap > fMethods
! Booked method information
void SetVerbose(Bool_t status)
Method enable print extra information in the algorithms.
void SetFile(TFile *file)
Method to set the pointer to TFile object, with a writable file.
Bool_t IsVerbose()
Method to see if the algorithm should print extra information.
Bool_t fVerbose
! flag for extra information
void SetModelPersistence(Bool_t status=kTRUE)
Method enable model persistence, then algorithms model is saved in xml or serialized files.
std::shared_ptr< DataLoader > fDataLoader
! data
Bool_t fSilentFile
! if true dont produce file output
TFile * GetFile()
Method to get the pointer to TFile object.
std::vector< OptionMap > & GetMethods()
Method get the Booked methods in a option map object.
TString fTransformations
! List of transformations to test
UInt_t fJobs
! number of jobs to run some high level algorithm in parallel
Envelope(const TString &name, DataLoader *dataloader=nullptr, TFile *file=nullptr, const TString options="")
Constructor for the initialization of Envelopes, differents Envelopes may needs differents constructo...
void WriteDataInformation(TMVA::DataSetInfo &fDataSetInfo, TMVA::Types::EAnalysisType fAnalysisType)
method to save Train/Test information into the output file.
static void InhibitOutput()
class to storage options for the differents methods
static Types & Instance()
The single instance of "Types" if existing already, or create it (Singleton).
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
create variable transformations
void CreateVariableTransforms(const TString &trafoDefinition, TMVA::DataSetInfo &dataInfo, TMVA::TransformationHandler &transformationHandler, TMVA::MsgLogger &log)
MsgLogger & Endl(MsgLogger &ml)