 |
Belle II Software
release-05-01-25
|
12 #ifndef INCLUDE_GUARD_BELLE2_MVA_FASTBDT_HEADER
13 #define INCLUDE_GUARD_BELLE2_MVA_FASTBDT_HEADER
15 #include <mva/interface/Options.h>
16 #include <mva/interface/Teacher.h>
17 #include <mva/interface/Expert.h>
21 #if FastBDT_VERSION_MAJOR >= 3
22 #include <FastBDT_IO.h>
27 #if FastBDT_VERSION_MAJOR >= 5
28 #include <Classifier.h>
32 #if FastBDT_VERSION_MAJOR <= 3 && FastBDT_VERSION_MINOR <= 2
35 bool compareIncludingNaN(
float i,
float j);
50 bool isValidSignal(
const std::vector<bool>& Signals);
62 virtual void load(
const boost::property_tree::ptree& pt)
override;
68 virtual void save(boost::property_tree::ptree& pt)
const override;
78 virtual std::string
getMethod()
const override {
return "FastBDT"; }
85 #if FastBDT_VERSION_MAJOR >= 5
86 std::vector<unsigned int>
88 double m_flatnessLoss = -1.0;
90 bool m_purityTransformation =
false;
92 m_individualPurityTransformation;
137 virtual std::vector<float>
apply(
Dataset& test_data)
const override;
141 #if FastBDT_VERSION_MAJOR >= 3
142 #if FastBDT_VERSION_MAJOR >= 5
143 bool m_use_simplified_interface =
false;
144 FastBDT::Classifier m_classifier;
Options for the FANN MVA method.
virtual Weightfile train(Dataset &training_data) const override
Train a mva method using the given dataset returning a Weightfile.
virtual void load(const boost::property_tree::ptree &pt) override
Load mechanism to load Options from a xml tree.
Teacher for the FastBDT MVA method.
Abstract base class of all Datasets given to the MVA interface The current event can always be access...
FastBDT::Forest m_expert_forest
Forest Expert.
virtual void save(boost::property_tree::ptree &pt) const override
Save mechanism to store Options in a xml tree.
Expert for the FastBDT MVA method.
The Weightfile class serializes all information about a training into an xml tree.
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 void load(Weightfile &weightfile) override
Load the expert from a Weightfile.
double m_randRatio
Fraction of data to use in the stochastic training.
Specific Options, all mehtod Options have to inherit from this class.
FastBDTOptions m_specific_options
Method specific options.
std::vector< FastBDT::FeatureBinning< float > > m_expert_feature_binning
Forest feature binning.
unsigned int m_nCuts
Number of cut Levels = log_2(Number of Cuts)
Abstract base class for different kinds of events.
Abstract base class of all Teachers Each MVA library has its own implementation of this class,...
FastBDTOptions m_specific_options
Method specific options.
unsigned int m_nTrees
Number of trees.
virtual std::string getMethod() const override
Return method name.
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.
FastBDTTeacher(const GeneralOptions &general_options, const FastBDTOptions &specific_options)
Constructs a new teacher using the GeneralOptions and specific options of this training.
unsigned int m_nLevels
Depth of tree.
double m_shrinkage
Shrinkage during the boosting step.