Belle II Software  release-05-02-19
Expert.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Thomas Keck *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #ifndef INCLUDE_GUARD_BELLE2_MVA_EXPERT_HEADER
13 #define INCLUDE_GUARD_BELLE2_MVA_EXPERT_HEADER
14 
15 #include <mva/interface/Options.h>
16 #include <mva/interface/Dataset.h>
17 #include <mva/interface/Weightfile.h>
18 
19 #include <vector>
20 
21 namespace Belle2 {
26  namespace MVA {
27 
33  class Expert {
34  public:
38  Expert() = default;
39 
44  virtual void load(Weightfile& weightfile) = 0;
45 
50  virtual std::vector<float> apply(Dataset& test_data) const = 0;
51 
59  virtual std::vector<float> apply(Dataset& test_data, const unsigned int classID) const
60  {
61 
62  (void) test_data;
63  (void) classID;
64 
65  return std::vector<float>();
66  };
67 
68 
72  virtual ~Expert() = default;
73  protected:
75  };
76 
77  }
79 }
80 #endif
Belle2::MVA::Expert::Expert
Expert()=default
Default constructor.
Belle2::MVA::Dataset
Abstract base class of all Datasets given to the MVA interface The current event can always be access...
Definition: Dataset.h:34
Belle2::MVA::Weightfile
The Weightfile class serializes all information about a training into an xml tree.
Definition: Weightfile.h:40
Belle2::MVA::Expert::load
virtual void load(Weightfile &weightfile)=0
Load the expert from a Weightfile.
Belle2::MVA::Expert::~Expert
virtual ~Expert()=default
Virtual destructor.
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::MVA::Expert
Abstract base class of all Expert Each MVA library has its own implementation of this class,...
Definition: Expert.h:33
Belle2::MVA::GeneralOptions
General options which are shared by all MVA trainings.
Definition: Options.h:64
Belle2::MVA::Expert::m_general_options
GeneralOptions m_general_options
General options loaded from the weightfile.
Definition: Expert.h:74
Belle2::MVA::Expert::apply
virtual std::vector< float > apply(Dataset &test_data) const =0
Apply this expert onto a dataset.
Belle2::MVA::Expert::apply
virtual std::vector< float > apply(Dataset &test_data, const unsigned int classID) const
Apply this expert onto a dataset.
Definition: Expert.h:59