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

Public Member Functions

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

Public Attributes

 tree
 cached copy of the MVA tool
 

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__()

def __init__ (   self)
Constructor

Reimplemented from DEDXEstimationTrainer.

Definition at line 376 of file train.py.

376 def __init__(self):
377 """Constructor"""
378
379
380 self.tree = tree.DecisionTreeRegressor()
381 DEDXEstimationTrainer.__init__(self)
382

Member Function Documentation

◆ test()

def 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()

def 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

◆ tree

tree

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: