Belle II Software development
MVADEDXEstimationTrainer Class Reference
Inheritance diagram for MVADEDXEstimationTrainer:
DEDXEstimationTrainer

Public Member Functions

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

Public Attributes

 tree = tree.DecisionTreeRegressor()
 cached copy of the MVA tool
 
 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 using multivariate data analysis

Definition at line 373 of file train.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)
Constructor

Definition at line 376 of file train.py.

376 def __init__(self):
377 """Constructor"""
378
379 ## cached copy of the MVA tool
380 self.tree = tree.DecisionTreeRegressor()
381 DEDXEstimationTrainer.__init__(self)
382

Member Function Documentation

◆ test()

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

Reimplemented from DEDXEstimationTrainer.

Definition at line 393 of file train.py.

393 def test(self, data):
394 """Get the trained neural-network output value for test data"""
395
396 test_data = data.copy()
397 del test_data["p"]
398
399 return self.tree.predict(test_data.values)

◆ train()

train ( self,
data )
Train the neural network using curated data

Reimplemented from DEDXEstimationTrainer.

Definition at line 383 of file train.py.

383 def train(self, data):
384 """Train the neural network using curated data"""
385
386 train_data = data.copy()
387 del train_data["p"]
388
389 p_values = data["p"]
390
391 self.tree.fit(train_data.values, p_values.values)
392
Definition train.py:1

Member Data Documentation

◆ dedx_column

str dedx_column = "dedx"
inherited

the default data column is 'dedx'

Definition at line 27 of file train.py.

◆ dedx_estimator_function

dedx_estimator_function = None
inherited

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

Definition at line 25 of file train.py.

◆ tree

tree = tree.DecisionTreeRegressor()

cached copy of the MVA tool

Definition at line 380 of file train.py.


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