10 #ifndef INCLUDE_GUARD_BELLE2_MVA_FASTBDT_HEADER
11 #define INCLUDE_GUARD_BELLE2_MVA_FASTBDT_HEADER
13 #include <mva/interface/Options.h>
14 #include <mva/interface/Teacher.h>
15 #include <mva/interface/Expert.h>
19 #if FastBDT_VERSION_MAJOR >= 3
20 #include <FastBDT_IO.h>
25 #if FastBDT_VERSION_MAJOR >= 5
26 #include <Classifier.h>
30 #if FastBDT_VERSION_MAJOR <= 3 && FastBDT_VERSION_MINOR <= 2
33 bool compareIncludingNaN(
float i,
float j);
48 bool isValidSignal(
const std::vector<bool>& Signals);
60 virtual void load(
const boost::property_tree::ptree& pt)
override;
66 virtual void save(boost::property_tree::ptree& pt)
const override;
76 virtual std::string
getMethod()
const override {
return "FastBDT"; }
83 #if FastBDT_VERSION_MAJOR >= 5
84 std::vector<unsigned int>
86 double m_flatnessLoss = -1.0;
88 bool m_purityTransformation =
false;
90 m_individualPurityTransformation;
135 virtual std::vector<float>
apply(
Dataset& test_data)
const override;
139 #if FastBDT_VERSION_MAJOR >= 3
140 #if FastBDT_VERSION_MAJOR >= 5
141 bool m_use_simplified_interface =
false;
142 FastBDT::Classifier m_classifier;
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 FastBDT MVA method.
std::vector< FastBDT::FeatureBinning< float > > m_expert_feature_binning
Forest feature binning.
virtual std::vector< float > apply(Dataset &test_data) const override
Apply this expert onto a dataset.
FastBDT::Forest m_expert_forest
Forest Expert.
virtual void load(Weightfile &weightfile) override
Load the expert from a Weightfile.
FastBDTOptions m_specific_options
Method specific options.
Options for the FANN MVA method.
virtual std::string getMethod() const override
Return method name.
virtual po::options_description getDescription() override
Returns a program options description for all available options.
double m_randRatio
Fraction of data to use in the stochastic training.
double m_shrinkage
Shrinkage during the boosting step.
virtual void load(const boost::property_tree::ptree &pt) override
Load mechanism to load Options from a xml tree.
unsigned int m_nLevels
Depth of tree.
virtual void save(boost::property_tree::ptree &pt) const override
Save mechanism to store Options in a xml tree.
unsigned int m_nCuts
Number of cut Levels = log_2(Number of Cuts)
unsigned int m_nTrees
Number of trees.
Teacher for the FastBDT MVA method.
FastBDTTeacher(const GeneralOptions &general_options, const FastBDTOptions &specific_options)
Constructs a new teacher using the GeneralOptions and specific options of this training.
FastBDTOptions 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.