Belle II Software development
Expert Class Referenceabstract

Abstract base class of all Expert Each MVA library has its own implementation of this class, so all libraries can be accessed via this common interface. More...

#include <Expert.h>

Inheritance diagram for Expert:
CombinationExpert FANNExpert FastBDTExpert PDFExpert PythonExpert RegressionExpert< BaseClassifierExpert, RegressionClassifierOptions > ReweighterExpert TMVAExpert TrivialExpert

Public Member Functions

 Expert ()=default
 Default constructor.
 
virtual void load (Weightfile &weightfile)=0
 Load the expert from a Weightfile.
 
virtual std::vector< float > apply (Dataset &test_data) const =0
 Apply this expert onto a dataset.
 
virtual std::vector< std::vector< float > > applyMulticlass (Dataset &test_data) const
 Apply this m_expert onto a dataset.
 
virtual ~Expert ()=default
 Virtual destructor.
 

Protected Attributes

GeneralOptions m_general_options
 General options loaded from the weightfile.
 

Detailed Description

Abstract base class of all Expert Each MVA library has its own implementation of this class, so all libraries can be accessed via this common interface.

Definition at line 31 of file Expert.h.

Member Function Documentation

◆ apply()

virtual std::vector< float > apply ( Dataset test_data) const
pure virtual

◆ applyMulticlass()

virtual std::vector< std::vector< float > > applyMulticlass ( Dataset test_data) const
inlinevirtual

Apply this m_expert onto a dataset.

Multiclass mode. Not pure virtual, since not all derived classes to re-implement this.

Parameters
test_datadataset.
Returns
vector of size N=test_data.getNumberOfEvents() with N=m_classes.size() scores for each event in the dataset.

Reimplemented in PythonExpert, TMVAExpertMulticlass, and TrivialExpert.

Definition at line 56 of file Expert.h.

57 {
58
59 B2ERROR("Attempted to call applyMulticlass() of the abstract base class MVA::Expert. All methods that support multiclass classification should override this definition.");
60 (void) test_data;
61
62 return std::vector<std::vector<float>>();
63 };

◆ load()

virtual void load ( Weightfile weightfile)
pure virtual

Member Data Documentation

◆ m_general_options

GeneralOptions m_general_options
protected

General options loaded from the weightfile.

Definition at line 70 of file Expert.h.


The documentation for this class was generated from the following file: