Belle II Software development
TMVAOptionsClassification Class Reference

Options for the TMVA Classification MVA method. More...

#include <TMVA.h>

Inheritance diagram for TMVAOptionsClassification:
TMVAOptions SpecificOptions Options

Public Member Functions

 TMVAOptionsClassification ()
 Constructor Adds Classification as AnalysisType to the factoryOptions.
 
virtual void load (const boost::property_tree::ptree &pt) override
 Load mechanism to load Options from a xml tree.
 
virtual void save (boost::property_tree::ptree &pt) const override
 Save mechanism to store Options in a xml tree.
 
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

bool transform2probability = true
 Transform output of method to a probability.
 
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.
 
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 Classification MVA method.

Definition at line 80 of file TMVA.h.

Constructor & Destructor Documentation

◆ TMVAOptionsClassification()

Constructor Adds Classification as AnalysisType to the factoryOptions.

Definition at line 87 of file TMVA.h.

88 {
89 m_factoryOption += ":AnalysisType=Classification";
90 }
std::string m_factoryOption
Factory options passed to tmva factory.
Definition: TMVA.h:71

Member Function Documentation

◆ getDescription()

po::options_description getDescription ( )
overridevirtual

Returns a program options description for all available options.

Reimplemented from TMVAOptions.

Definition at line 81 of file TMVA.cc.

82 {
83 po::options_description description = TMVAOptions::getDescription();
84 description.add_options()
85 ("tmva_transform2probability", po::value<bool>(&transform2probability), "TMVA Transform output of classifier to a probability");
86 return description;
87 }
bool transform2probability
Transform output of method to a probability.
Definition: TMVA.h:115
virtual po::options_description getDescription() override
Returns a program options description for all available options.
Definition: TMVA.cc:55

◆ getMethod()

virtual std::string getMethod ( ) const
inlineoverridevirtual

Return method name.

Reimplemented from TMVAOptions.

Definition at line 112 of file TMVA.h.

112{ return "TMVAClassification"; }

◆ load()

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

Load mechanism to load Options from a xml tree.

Parameters
ptxml tree

Reimplemented from TMVAOptions.

Definition at line 69 of file TMVA.cc.

70 {
72 transform2probability = pt.get<bool>("TMVA_transform2probability");
73 }
virtual void load(const boost::property_tree::ptree &pt) override
Load mechanism to load Options from a xml tree.
Definition: TMVA.cc:27

◆ save()

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

Save mechanism to store Options in a xml tree.

Parameters
ptxml tree

Reimplemented from TMVAOptions.

Definition at line 75 of file TMVA.cc.

76 {
78 pt.put("TMVA_transform2probability", transform2probability);
79 }
virtual void save(boost::property_tree::ptree &pt) const override
Save mechanism to store Options in a xml tree.
Definition: TMVA.cc:43

Member Data Documentation

◆ m_config

std::string m_config
inherited
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.

◆ m_factoryOption

std::string m_factoryOption = "!V:!Silent:Color:DrawProgressBar"
inherited

Factory options passed to tmva factory.

Definition at line 71 of file TMVA.h.

◆ m_method

std::string m_method = "BDT"
inherited

tmva method name

Definition at line 60 of file TMVA.h.

◆ m_prefix

std::string m_prefix = "TMVA"
inherited

Prefix used for all files generated by TMVA.

Definition at line 74 of file TMVA.h.

◆ m_prepareOption

std::string m_prepareOption = "SplitMode=random:!V"
inherited

Prepare options passed to prepareTrainingAndTestTree method.

Definition at line 72 of file TMVA.h.

◆ m_type

std::string m_type = "BDT"
inherited

tmva method type

Definition at line 61 of file TMVA.h.

◆ m_workingDirectory

std::string m_workingDirectory = ""
inherited

Working directory of TMVA, if empty a temporary directory is used.

Definition at line 73 of file TMVA.h.

◆ transform2probability

bool transform2probability = true

Transform output of method to a probability.

Definition at line 115 of file TMVA.h.


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