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