Belle II Software  release-08-01-10
RegressionExpert< BaseClassifierExpert, RegressionClassifierOptions > Class Template Reference

Generic expert for the regression applications. More...

#include <Regression.h>

Inheritance diagram for RegressionExpert< BaseClassifierExpert, RegressionClassifierOptions >:
Collaboration diagram for RegressionExpert< BaseClassifierExpert, RegressionClassifierOptions >:

Public Member Functions

void load (Weightfile &weightfile) override
 Load the expert from the weightfile by loading each stored single classifier one ofter the other.
 
std::vector< float > apply (Dataset &test_data) const override
 Apply the loaded experts by averaging over the single expert decisions.
 
virtual std::vector< std::vector< float > > applyMulticlass (Dataset &test_data) const
 Apply this m_expert onto a dataset. More...
 

Protected Attributes

GeneralOptions m_general_options
 General options loaded from the weightfile.
 

Private Attributes

std::vector< BaseClassifierExpert > m_baseClassifierExperts
 The list of single experts.
 

Detailed Description

template<class BaseClassifierExpert, class RegressionClassifierOptions>
class Belle2::MVA::RegressionExpert< BaseClassifierExpert, RegressionClassifierOptions >

Generic expert for the regression applications.

For each trained base classifier (for each bin, see the teacher for how this is done), one weight file is written as part into the full weight file. This expert reads all of them, instantiates a base expert for each bin and applies all of them to the dataset.

The result of the calculation is given by

 probability = sum(expert probability for each expert) / # of experts
Template Parameters
BaseClassifierExpertAnother expert that is related to the teacher you used for training
RegressionClassifierOptionsThe options of the classifier (probably inheriting from RegressionOptions)

Definition at line 179 of file Regression.h.

Member Function Documentation

◆ applyMulticlass()

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

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 TrivialExpert, TMVAExpertMulticlass, and PythonExpert.

Definition at line 56 of file Expert.h.


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