Belle II Software development
MedianEstimatorTrainerSQRT Class Reference
Inheritance diagram for MedianEstimatorTrainerSQRT:
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 354 of file train.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Constructor

Reimplemented from FittedGroupedDEDXEstimatorTrainer.

Definition at line 357 of file train.py.

357 def __init__(self):
358 """Constructor"""
359 FittedGroupedDEDXEstimatorTrainer.__init__(self, fit_functions.inverse_sqrt, use_sigma_for_result_fitting=True)
360
361 def train_function(fit_data):
362 """Train on the curated-data median values whose truth value is known"""
363 weighted_p_values = fit_data.apply(lambda data: [data.p_bin_centers] * int(data.number_of_p_values), axis=1).sum()
364 median_value = np.median(weighted_p_values)
365 iqr = np.percentile(weighted_p_values, 75) - np.percentile(weighted_p_values, 50)
366
367 return [iqr, [None, median_value, None]]
368
369
370 self.train_function = train_function
371
372

Member Data Documentation

◆ train_function

train_function

this class's training function

Definition at line 370 of file train.py.


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