 |
Belle II Software
release-05-01-25
|
12 #ifndef INCLUDE_GUARD_BELLE2_MVA_REWEIGHTER_HEADER
13 #define INCLUDE_GUARD_BELLE2_MVA_REWEIGHTER_HEADER
15 #include <mva/interface/Options.h>
16 #include <mva/interface/Teacher.h>
17 #include <mva/interface/Expert.h>
37 virtual void load(
const boost::property_tree::ptree& pt)
override;
43 virtual void save(boost::property_tree::ptree& pt)
const override;
53 virtual std::string
getMethod()
const override {
return "Reweighter"; }
99 virtual std::vector<float>
apply(
Dataset& test_data)
const override;
Options for the Reweighter MVA method.
Abstract base class of all Datasets given to the MVA interface The current event can always be access...
virtual void load(const boost::property_tree::ptree &pt) override
Load mechanism to load Options from a xml tree.
std::string m_variable
Variable which decides if the reweighter is applied or not.
The Weightfile class serializes all information about a training into an xml tree.
Teacher for the Reweighter MVA method.
virtual Weightfile train(Dataset &training_data) const override
Train a mva method using the given dataset returning a Weightfile.
std::string m_weightfile
Weightfile of the reweighting expert.
Expert for the Reweighter MVA method.
Specific Options, all mehtod Options have to inherit from this class.
virtual std::string getMethod() const override
Return method name.
Abstract base class for different kinds of events.
Abstract base class of all Teachers Each MVA library has its own implementation of this class,...
virtual void save(boost::property_tree::ptree &pt) const override
Save mechanism to store Options in a xml tree.
virtual void load(Weightfile &weightfile) override
Load the expert from a Weightfile.
double m_norm
Norm for the weights.
Abstract base class of all Expert Each MVA library has its own implementation of this class,...
General options which are shared by all MVA trainings.
GeneralOptions m_expert_options
Method general options of the expert.
ReweighterOptions m_specific_options
Method specific options.
virtual std::vector< float > apply(Dataset &test_data) const override
Apply this expert onto a dataset.
std::unique_ptr< Expert > m_expert
Experts used to reweight.
virtual po::options_description getDescription() override
Returns a program options description for all available options.
ReweighterOptions m_specific_options
Method specific options.
ReweighterTeacher(const GeneralOptions &general_options, const ReweighterOptions &specific_options)
Constructs a new teacher using the GeneralOptions and specific options of this training.