Belle II Software  release-08-01-10
TMVAOptions Class Reference

Options for the TMVA MVA method. More...

#include <TMVA.h>

Inheritance diagram for TMVAOptions:
Collaboration diagram for TMVAOptions:

Public Member Functions

virtual void load (const boost::property_tree::ptree &pt) override
 Load mechanism to load Options from a xml tree. More...
 
virtual void save (boost::property_tree::ptree &pt) const override
 Save mechanism to store Options in a xml tree. More...
 
virtual po::options_description getDescription () override
 Returns a program options description for all available options.
 
virtual std::string getMethod () const override
 Return method name.
 

Public Attributes

std::string m_method = "BDT"
 tmva method name
 
std::string m_type = "BDT"
 tmva method type
 
std::string m_config
 TMVA config string for the chosen method. More...
 
std::string m_factoryOption = "!V:!Silent:Color:DrawProgressBar"
 Factory options passed to tmva factory.
 
std::string m_prepareOption = "SplitMode=random:!V"
 Prepare options passed to prepareTrainingAndTestTree method.
 
std::string m_workingDirectory = ""
 Working directory of TMVA, if empty a temporary directory is used.
 
std::string m_prefix = "TMVA"
 Prefix used for all files generated by TMVA.
 

Detailed Description

Options for the TMVA MVA method.

Definition at line 34 of file TMVA.h.

Member Function Documentation

◆ load()

void load ( const boost::property_tree::ptree &  pt)
overridevirtual

Load mechanism to load Options from a xml tree.

Parameters
ptxml tree

Implements Options.

Reimplemented in TMVAOptionsMulticlass, and TMVAOptionsClassification.

Definition at line 27 of file TMVA.cc.

28  {
29  int version = pt.get<int>("TMVA_version");
30  if (version != 1) {
31  B2ERROR("Unknown weightfile version " << std::to_string(version));
32  throw std::runtime_error("Unknown weightfile version " + std::to_string(version));
33  }
34  m_method = pt.get<std::string>("TMVA_method");
35  m_type = pt.get<std::string>("TMVA_type");
36  m_config = pt.get<std::string>("TMVA_config");
37  m_factoryOption = pt.get<std::string>("TMVA_factoryOption");
38  m_prepareOption = pt.get<std::string>("TMVA_prepareOption");
39  m_workingDirectory = pt.get<std::string>("TMVA_workingDirectory");
40  m_prefix = pt.get<std::string>("TMVA_prefix");
41  }
std::string m_prepareOption
Prepare options passed to prepareTrainingAndTestTree method.
Definition: TMVA.h:72
std::string m_prefix
Prefix used for all files generated by TMVA.
Definition: TMVA.h:74
std::string m_config
TMVA config string for the chosen method.
Definition: TMVA.h:66
std::string m_method
tmva method name
Definition: TMVA.h:60
std::string m_factoryOption
Factory options passed to tmva factory.
Definition: TMVA.h:71
std::string m_type
tmva method type
Definition: TMVA.h:61
std::string m_workingDirectory
Working directory of TMVA, if empty a temporary directory is used.
Definition: TMVA.h:73

◆ save()

void save ( boost::property_tree::ptree &  pt) const
overridevirtual

Save mechanism to store Options in a xml tree.

Parameters
ptxml tree

Implements Options.

Reimplemented in TMVAOptionsMulticlass, and TMVAOptionsClassification.

Definition at line 43 of file TMVA.cc.

Member Data Documentation

◆ m_config

std::string m_config
Initial value:
=
"!H:!V:CreateMVAPdfs:NTrees=400:BoostType=Grad:Shrinkage=0.1:UseBaggedBoost:BaggedSampleFraction=0.5:nCuts=1024:MaxDepth=3:IgnoreNegWeightsInTraining"

TMVA config string for the chosen method.

Definition at line 66 of file TMVA.h.


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