Belle II Software development
MVAExpert.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/utilities/Named.h>
11#include <RtypesCore.h>
12
13#include <vector>
14#include <memory>
15#include <string>
16
17namespace Belle2 {
22
23 namespace TrackFindingCDC {
24
26 class MVAExpert {
27
28 public:
35 MVAExpert(const std::string& identifier, std::vector<Named<Float_t*>> namedVariables);
36
39
41 void initialize();
42
44 void beginRun();
45
47 double predict();
48
50 std::vector<float> predict(float* /* test_data */, int /* nFeature */, int nRows);
51
53 std::vector<std::string> getVariableNames();
54 private:
56 class Impl;
57
59 std::unique_ptr<Impl> m_impl;
60 };
61 }
63}
Implementation of the class to interact with the MVA package.
Definition MVAExpert.cc:31
void initialize()
Initialise the mva method.
Definition MVAExpert.cc:208
void beginRun()
Update the mva method to the new run.
Definition MVAExpert.cc:213
std::unique_ptr< Impl > m_impl
Pointer to implementation hiding the details.
Definition MVAExpert.h:59
~MVAExpert()
Destructor must be defined in cpp because of PImpl pointer.
MVAExpert(const std::string &identifier, std::vector< Named< Float_t * > > namedVariables)
Construct the Expert with the specified weight folder and the name of the training that was used in t...
double predict()
Evaluate the MVA method and return the MVAOutput.
Definition MVAExpert.cc:218
std::vector< std::string > getVariableNames()
Get selected variable names.
Definition MVAExpert.cc:228
A mixin class to attach a name to an object.
Definition Named.h:23
Abstract base class for different kinds of events.