 |
Belle II Software
release-05-02-19
|
13 #ifndef INCLUDE_GUARD_BELLE2_MVA_THEANO_HEADER
14 #define INCLUDE_GUARD_BELLE2_MVA_THEANO_HEADER
16 #include <mva/interface/Options.h>
17 #include <mva/interface/Teacher.h>
18 #include <mva/interface/Expert.h>
25 #if !defined(__CLING__)
29 #if !defined(__GNUG__) || defined(__ICC)
31 #pragma GCC diagnostic push
32 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
33 #pragma GCC diagnostic ignored "-Wunused-parameter"
35 #include <boost/python/object.hpp>
36 #include <boost/python/dict.hpp>
37 #include <boost/python/import.hpp>
38 #include <boost/python/extract.hpp>
39 #if !defined(__GNUG__) || defined(__ICC)
41 #pragma GCC diagnostic pop
61 virtual void load(
const boost::property_tree::ptree& pt)
override;
67 virtual void save(boost::property_tree::ptree& pt)
const override;
77 virtual std::string
getMethod()
const override {
return "Python"; }
133 virtual std::vector<float>
apply(
Dataset& test_data)
const override;
PythonOptions m_specific_options
Method specific options.
virtual void save(boost::property_tree::ptree &pt) const override
Save mechanism to store Options in a xml tree.
Abstract base class of all Datasets given to the MVA interface The current event can always be access...
virtual void load(Weightfile &weightfile) override
Load the expert from a Weightfile.
virtual void load(const boost::property_tree::ptree &pt) override
Load mechanism to load Options from a xml tree.
The Weightfile class serializes all information about a training into an xml tree.
virtual Weightfile train(Dataset &training_data) const override
Train a mva method using the given dataset returning a Weightfile.
bool m_normalize
Normalize the inputs (shift mean to zero and std to 1)
Specific Options, all mehtod Options have to inherit from this class.
boost::python::object m_framework
Framework module.
unsigned int m_nIterations
Number of iterations trough the whole data.
Abstract base class for different kinds of events.
Abstract base class of all Teachers Each MVA library has its own implementation of this class,...
Expert for the Python MVA method.
boost::python::object m_state
current state object of method
std::vector< float > m_stds
Stds of all features for normalization.
std::string m_steering_file
steering file provided by the user to override the functions in the framework
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.
double m_training_fraction
Fraction of data passed as training data, rest is passed as test data.
unsigned int m_mini_batch_size
Mini batch size, 0 passes the whole data in one call.
virtual po::options_description getDescription() override
Returns a program options description for all available options.
virtual std::vector< float > apply(Dataset &test_data) const override
Apply this expert onto a dataset.
virtual std::string getMethod() const override
Return method name.
PythonOptions m_specific_options
Method specific options.
PythonExpert()
Constructs a new Python Expert.
std::string m_framework
framework to use e.g.
Options for the Python MVA method.
std::vector< float > m_means
Means of all features for normalization.
PythonTeacher(const GeneralOptions &general_options, const PythonOptions &specific_options)
Constructs a new teacher using the GeneralOptions and specific options of this training.
Teacher for the Python MVA method.
std::string m_config
Config string in json, which is passed to the get model function.