Belle II Software light-2406-ragdoll
CombinationTeacher Class Reference

Teacher for the Combination MVA method. More...

#include <Combination.h>

Inheritance diagram for CombinationTeacher:
Collaboration diagram for CombinationTeacher:

Public Member Functions

 CombinationTeacher (const GeneralOptions &general_options, const CombinationOptions &specific_options)
 Constructs a new teacher using the GeneralOptions and specific options of this training.
 
virtual Weightfile train (Dataset &training_data) const override
 Train a mva method using the given dataset returning a Weightfile.
 

Protected Attributes

GeneralOptions m_general_options
 GeneralOptions containing all shared options.
 

Private Attributes

CombinationOptions m_specific_options
 Method specific options.
 

Detailed Description

Teacher for the Combination MVA method.

Definition at line 60 of file Combination.h.

Constructor & Destructor Documentation

◆ CombinationTeacher()

CombinationTeacher ( const GeneralOptions general_options,
const CombinationOptions specific_options 
)

Constructs a new teacher using the GeneralOptions and specific options of this training.

Parameters
general_optionsdefining all shared options
specific_optionsdefininf all method specific options

Definition at line 56 of file Combination.cc.

57 : Teacher(general_options),
58 m_specific_options(specific_options) { }
CombinationOptions m_specific_options
Method specific options.
Definition: Combination.h:77
Teacher(const GeneralOptions &general_options)
Constructs a new teacher using the GeneralOptions for this training.
Definition: Teacher.cc:18

Member Function Documentation

◆ train()

Weightfile train ( Dataset training_data) const
overridevirtual

Train a mva method using the given dataset returning a Weightfile.

Parameters
training_dataused to train the method

Implements Teacher.

Definition at line 60 of file Combination.cc.

61 {
62
63 Weightfile weightfile;
64 weightfile.addOptions(m_general_options);
65 weightfile.addOptions(m_specific_options);
66
67 for (unsigned int i = 0; i < m_specific_options.m_weightfiles.size(); ++i) {
68 weightfile.addFile("Combination_Weightfile" + std::to_string(i), m_specific_options.m_weightfiles[i]);
69 }
70
71 weightfile.addSignalFraction(training_data.getSignalFraction());
72
73 return weightfile;
74
75 }
std::vector< std::string > m_weightfiles
Weightfiles of all methods we want to combine.
Definition: Combination.h:53
GeneralOptions m_general_options
GeneralOptions containing all shared options.
Definition: Teacher.h:49

Member Data Documentation

◆ m_general_options

GeneralOptions m_general_options
protectedinherited

GeneralOptions containing all shared options.

Definition at line 49 of file Teacher.h.

◆ m_specific_options

CombinationOptions m_specific_options
private

Method specific options.

Definition at line 77 of file Combination.h.


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