Belle II Software development
DEDXEstimationTrainer Class Reference
Inheritance diagram for DEDXEstimationTrainer:
GroupedDEDXEstimationTrainer MVADEDXEstimationTrainer FittedGroupedDEDXEstimatorTrainer FunctionFittedGroupedDEDXEstimatorTrainer MaximumEstimatorTrainer MaximumEstimatorTrainerSQRT MedianEstimatorTrainer MedianEstimatorTrainerSQRT GaussianEstimatorTrainer GaussianEstimatorTrainerSQRT LandauEstimatorTrainer LandauEstimatorTrainerSQRT

Public Member Functions

 __init__ (self)
 
 train (self, data)
 
 test (self, data)
 

Public Attributes

 dedx_estimator_function = None
 by default, the dE/dx-particle-identification trainer has not run yet
 
str dedx_column = "dedx"
 the default data column is 'dedx'
 

Detailed Description

Train a neural network for dE/dx-based particle identification

Definition at line 19 of file train.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)
Constructor

Definition at line 22 of file train.py.

22 def __init__(self):
23 """Constructor"""
24 ## by default, the dE/dx-particle-identification trainer has not run yet
25 self.dedx_estimator_function = None
26 ## the default data column is 'dedx'
27 self.dedx_column = "dedx"
28

Member Function Documentation

◆ test()

test ( self,
data )
Get the trained neural-network output value for test data

Reimplemented in MVADEDXEstimationTrainer.

Definition at line 34 of file train.py.

34 def test(self, data):
35 """Get the trained neural-network output value for test data"""
36 if self.dedx_estimator_function is None:
37 raise ValueError("Train the estimator first!")
38
39 return self.dedx_estimator_function(data[self.dedx_column])
40
41

◆ train()

train ( self,
data )
Train on the input data

Reimplemented in FittedGroupedDEDXEstimatorTrainer, and MVADEDXEstimationTrainer.

Definition at line 29 of file train.py.

29 def train(self, data):
30 """Train on the input data"""
31 # We have everything
32 raise NotImplementedError("Use this class as a base class only")
33
Definition train.py:1

Member Data Documentation

◆ dedx_column

str dedx_column = "dedx"

the default data column is 'dedx'

Definition at line 27 of file train.py.

◆ dedx_estimator_function

dedx_estimator_function = None

by default, the dE/dx-particle-identification trainer has not run yet

Definition at line 25 of file train.py.


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