Belle II Software development
MVAExpert Class Reference

Class to interact with the MVA package. More...

#include <MVAExpert.h>

Classes

class  Impl
 Implementation of the class to interact with the MVA package. More...
 

Public Member Functions

 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 the teacher run.
 
 ~MVAExpert ()
 Destructor must be defined in cpp because of PImpl pointer.
 
void initialize ()
 Initialise the mva method.
 
void beginRun ()
 Update the mva method to the new run.
 
double predict ()
 Evaluate the MVA method and return the MVAOutput.
 
std::vector< float > predict (float *, int, int nRows)
 Evaluate the MVA method and return the MVAOutput for multiple inputs at the same time.
 
std::vector< std::string > getVariableNames ()
 Get selected variable names.
 

Private Attributes

std::unique_ptr< Implm_impl
 Pointer to implementation hiding the details.
 

Detailed Description

Class to interact with the MVA package.

Definition at line 26 of file MVAExpert.h.

Constructor & Destructor Documentation

◆ MVAExpert()

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 the teacher run.

Parameters
identifierA database identifier or local file name.
namedVariablesThe names and pointers to the variables to be fed to the mva method

Member Function Documentation

◆ beginRun()

void beginRun ( )

Update the mva method to the new run.

Definition at line 213 of file MVAExpert.cc.

214{
215 return m_impl->beginRun();
216}
std::unique_ptr< Impl > m_impl
Pointer to implementation hiding the details.
Definition: MVAExpert.h:59

◆ getVariableNames()

std::vector< std::string > getVariableNames ( )

Get selected variable names.

Definition at line 228 of file MVAExpert.cc.

229{
230 return m_impl->getVariableNames();
231}

◆ initialize()

void initialize ( )
Initial value:
{
}
~MVAExpert()
Destructor must be defined in cpp because of PImpl pointer.

Initialise the mva method.

PImpl Interface.

Definition at line 208 of file MVAExpert.cc.

209{
210 return m_impl->initialize();
211}

◆ predict() [1/2]

double predict ( )

Evaluate the MVA method and return the MVAOutput.

Definition at line 218 of file MVAExpert.cc.

219{
220 return m_impl->predict();
221}

◆ predict() [2/2]

std::vector< float > predict ( float *  test_data,
int  nFeature,
int  nRows 
)

Evaluate the MVA method and return the MVAOutput for multiple inputs at the same time.

Definition at line 223 of file MVAExpert.cc.

224{
225 return m_impl->predict(test_data, nFeature, nRows);
226}

Member Data Documentation

◆ m_impl

std::unique_ptr<Impl> m_impl
private

Pointer to implementation hiding the details.

Definition at line 59 of file MVAExpert.h.


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