Belle II Software development
MedianEstimatorTrainer Class Reference
Inheritance diagram for MedianEstimatorTrainer:
FittedGroupedDEDXEstimatorTrainer GroupedDEDXEstimationTrainer DEDXEstimationTrainer

Public Member Functions

def __init__ (self)
 

Public Attributes

 train_function
 this class's training function
 

Detailed Description

Train a neural network for dE/dx-based particle identification using only the median values

Definition at line 292 of file train.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Constructor

Reimplemented from FittedGroupedDEDXEstimatorTrainer.

Definition at line 295 of file train.py.

295 def __init__(self):
296 """Constructor"""
297 FittedGroupedDEDXEstimatorTrainer.__init__(self, fit_functions.inverse_squared, use_sigma_for_result_fitting=True)
298
299 def train_function(fit_data):
300 """Train on the curated-data median values whose truth value is known"""
301 weighted_p_values = fit_data.apply(lambda data: [data.p_bin_centers] * int(data.number_of_p_values), axis=1).sum()
302 median_value = np.median(weighted_p_values)
303 iqr = np.percentile(weighted_p_values, 75) - np.percentile(weighted_p_values, 50)
304
305 return [iqr, [None, median_value, None]]
306
307
308 self.train_function = train_function
309
310

Member Data Documentation

◆ train_function

train_function

this class's training function

Definition at line 308 of file train.py.


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