Belle II Software  release-05-02-19
TrivialExpert Class Reference

Expert for the Trivial MVA method. More...

#include <Trivial.h>

Inheritance diagram for TrivialExpert:
Collaboration diagram for TrivialExpert:

Public Member Functions

virtual void load (Weightfile &weightfile) override
 Load the expert from a Weightfile. More...
 
virtual std::vector< float > apply (Dataset &test_data) const override
 Apply this expert onto a dataset. More...
 
virtual std::vector< float > apply (Dataset &test_data, const unsigned int classID) const
 Apply this expert onto a dataset. More...
 

Protected Attributes

GeneralOptions m_general_options
 General options loaded from the weightfile.
 

Private Attributes

TrivialOptions m_specific_options
 Method specific options.
 

Detailed Description

Expert for the Trivial MVA method.

Used for debugging and testing

Definition at line 86 of file Trivial.h.

Member Function Documentation

◆ apply() [1/2]

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

Apply this expert onto a dataset.

Parameters
test_datadataset

Implements Expert.

Definition at line 64 of file Trivial.cc.

65  {
66 
67  std::vector<float> probabilities(test_data.getNumberOfEvents());
68  for (unsigned int iEvent = 0; iEvent < test_data.getNumberOfEvents(); ++iEvent) {
69  test_data.loadEvent(iEvent);
70  probabilities[iEvent] = m_specific_options.m_output;
71  }
72 
73  return probabilities;
74 
75  }

◆ apply() [2/2]

virtual std::vector<float> apply ( Dataset test_data,
const unsigned int  classID 
) const
inlinevirtualinherited

Apply this expert onto a dataset.

Multi-class mode signature. Not pure virtual, since not all derived classes need to re-implement this.

Parameters
test_datadataset
classIDclass identifier.

Reimplemented in TMVAExpertMulticlass.

Definition at line 59 of file Expert.h.

◆ load()

void load ( Weightfile weightfile)
overridevirtual

Load the expert from a Weightfile.

Parameters
weightfilecontaining all information necessary to build the expert

Implements Expert.

Definition at line 59 of file Trivial.cc.


The documentation for this class was generated from the following files:
Belle2::MVA::TrivialExpert::m_specific_options
TrivialOptions m_specific_options
Method specific options.
Definition: Trivial.h:102
Belle2::MVA::TrivialOptions::m_output
double m_output
Output of the trivial method.
Definition: Trivial.h:55