10#ifndef INCLUDE_GUARD_BELLE2_MVA_FANN_HEADER
11#define INCLUDE_GUARD_BELLE2_MVA_FANN_HEADER
13#include <mva/interface/Options.h>
14#include <mva/interface/Teacher.h>
15#include <mva/interface/Expert.h>
36 virtual void load(
const boost::property_tree::ptree& pt)
override;
42 virtual void save(boost::property_tree::ptree& pt)
const override;
52 virtual std::string
getMethod()
const override {
return "FANN"; }
128 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,...
Expert for the FANN MVA method.
virtual ~FANNExpert()
Destructor of FANN Expert.
struct fann * m_ann
Pointer to FANN expert.
virtual std::vector< float > apply(Dataset &test_data) const override
Apply this expert onto a dataset.
virtual void load(Weightfile &weightfile) override
Load the expert from a Weightfile.
FANNOptions m_specific_options
Method specific options.
Options for the FANN MVA method.
double m_validation_fraction
Fraction of training sample used for validation in order to avoid overtraining.
virtual std::string getMethod() const override
Return method name.
std::string m_hidden_layers_architecture
String containing the architecture of hidden neurons.
bool m_scale_features
Scale features before training.
bool m_verbose_mode
Sets to report training status or not.
unsigned int m_random_seeds
Number of times the training is repeated with a new weight random seed.
std::string m_error_function
Loss function.
virtual po::options_description getDescription() override
Returns a program options description for all available options.
unsigned int m_number_of_threads
Number of threads for parallel training.
unsigned int m_test_rate
Error on validation is compared with the one before.
std::string m_hidden_activiation_function
Activation function in hidden layer.
bool m_scale_target
Scale target before training.
std::vector< unsigned int > getHiddenLayerNeurons(unsigned int nf) const
Returns the internal vector parameter with the number of hidden neurons per layer.
virtual void load(const boost::property_tree::ptree &pt) override
Load mechanism to load Options from a xml tree.
std::string m_training_method
Training method for back propagation.
std::string m_output_activiation_function
Activation function in output layer.
unsigned int m_max_epochs
Maximum number of epochs.
virtual void save(boost::property_tree::ptree &pt) const override
Save mechanism to store Options in a xml tree.
Teacher for the FANN MVA method.
FANNOptions 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.
General options which are shared by all MVA trainings.
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.