Belle II Software development
GRLMLPData Class Reference

Struct for training data of a single MLP for the neuro trigger. More...

#include <GRLMLPData.h>

Inheritance diagram for GRLMLPData:

Public Member Functions

 GRLMLPData ()
 default constructor.
 
 ~GRLMLPData ()
 destructor, empty because we don't allocate memory anywhere.
 
void addSample (const std::vector< float > &input, const std::vector< float > &target)
 add a pair of input and target
 
unsigned getNumberOfSamples () const
 get number of samples (same for input and target)
 
const std::vector< float > & getInput (unsigned i) const
 get input vector of sample i
 
const std::vector< float > & getTarget (unsigned i) const
 get target value of sample i
 

Private Member Functions

 ClassDef (GRLMLPData, 1)
 Needed to make the ROOT object storable.
 

Private Attributes

std::vector< std::vector< float > > m_inputSamples
 list of input vectors for network training.
 
std::vector< std::vector< float > > m_targetSamples
 list of target values for network training.
 

Detailed Description

Struct for training data of a single MLP for the neuro trigger.

Definition at line 20 of file GRLMLPData.h.

Constructor & Destructor Documentation

◆ GRLMLPData()

GRLMLPData ( )
inline

default constructor.

Definition at line 23 of file GRLMLPData.h.

std::vector< std::vector< float > > m_inputSamples
list of input vectors for network training.
Definition: GRLMLPData.h:43
std::vector< std::vector< float > > m_targetSamples
list of target values for network training.
Definition: GRLMLPData.h:45

◆ ~GRLMLPData()

~GRLMLPData ( )
inline

destructor, empty because we don't allocate memory anywhere.

Definition at line 25 of file GRLMLPData.h.

25{ }

Member Function Documentation

◆ addSample()

void addSample ( const std::vector< float > &  input,
const std::vector< float > &  target 
)
inline

add a pair of input and target

Definition at line 28 of file GRLMLPData.h.

29 {
30 m_inputSamples.push_back(input);
31 m_targetSamples.push_back(target);
32 }

◆ getInput()

const std::vector< float > & getInput ( unsigned  i) const
inline

get input vector of sample i

Definition at line 37 of file GRLMLPData.h.

37{ return m_inputSamples[i]; }

◆ getNumberOfSamples()

unsigned getNumberOfSamples ( ) const
inline

get number of samples (same for input and target)

Definition at line 35 of file GRLMLPData.h.

35{ return m_targetSamples.size(); }

◆ getTarget()

const std::vector< float > & getTarget ( unsigned  i) const
inline

get target value of sample i

Definition at line 39 of file GRLMLPData.h.

39{ return m_targetSamples[i]; }

Member Data Documentation

◆ m_inputSamples

std::vector<std::vector<float> > m_inputSamples
private

list of input vectors for network training.

Definition at line 43 of file GRLMLPData.h.

◆ m_targetSamples

std::vector<std::vector<float> > m_targetSamples
private

list of target values for network training.

Definition at line 45 of file GRLMLPData.h.


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