Belle II Software  release-05-01-25
tracking.validation.scores Namespace Reference

Functions

def data_amount (truths, predictions)
 
def signal_amount (truths, predictions)
 
def accepted_amount (truths, predictions)
 
def accepted_signal_amount (truths, predictions)
 
def background_amount (truths, predictions)
 
def rejected_amount (truths, predictions)
 
def rejected_signal_amount (truths, predictions)
 
def accepted_background_amount (truths, predictions)
 
def rejected_background_amount (truths, predictions)
 
def purity (truths, predictions)
 
def efficiency (truths, predictions)
 
def accuracy (truths, predictions)
 
def background_rejection (truths, predictions)
 
def signal_background_ratio (truths, predictions)
 

Detailed Description

This module contains score functions to quantify the quality of a classification

All score function have the signature
def score(truths, predictions):

comparing the truth information against a model and return a numerical value.

Function Documentation

◆ accepted_amount()

def tracking.validation.scores.accepted_amount (   truths,
  predictions 
)
Score function: amount accepted of a classification

Definition at line 28 of file scores.py.

28 def accepted_amount(truths, predictions):
29  """Score function: amount accepted of a classification"""
30  return np.count_nonzero(predictions)
31 
32 

◆ accepted_background_amount()

def tracking.validation.scores.accepted_background_amount (   truths,
  predictions 
)
Score function: amount of accepted background of a classification

Definition at line 58 of file scores.py.

◆ accepted_signal_amount()

def tracking.validation.scores.accepted_signal_amount (   truths,
  predictions 
)
Score function: amount of accepted signal of a classification

Definition at line 33 of file scores.py.

◆ accuracy()

def tracking.validation.scores.accuracy (   truths,
  predictions 
)
Score function: accuracy = (accepted signal + rejected background) / total

Definition at line 81 of file scores.py.

◆ background_amount()

def tracking.validation.scores.background_amount (   truths,
  predictions 
)
Score function: amount of background of a classification

Definition at line 43 of file scores.py.

◆ background_rejection()

def tracking.validation.scores.background_rejection (   truths,
  predictions 
)
Score function: background rejection = rejected background / background

Definition at line 88 of file scores.py.

◆ data_amount()

def tracking.validation.scores.data_amount (   truths,
  predictions 
)
Score function: amount of data after a selection

Definition at line 12 of file scores.py.

◆ efficiency()

def tracking.validation.scores.efficiency (   truths,
  predictions 
)
Score function: efficiency = accepted signal / signal

Definition at line 76 of file scores.py.

◆ purity()

def tracking.validation.scores.purity (   truths,
  predictions 
)
Score function: purity = accepted signal / accepted

Definition at line 71 of file scores.py.

◆ rejected_amount()

def tracking.validation.scores.rejected_amount (   truths,
  predictions 
)
Score function: amount rejected of a classification

Definition at line 48 of file scores.py.

◆ rejected_background_amount()

def tracking.validation.scores.rejected_background_amount (   truths,
  predictions 
)
Score function: amount of rejected background of a classification

Definition at line 63 of file scores.py.

◆ rejected_signal_amount()

def tracking.validation.scores.rejected_signal_amount (   truths,
  predictions 
)
Score function: amount of rejected signal of a classification

Definition at line 53 of file scores.py.

◆ signal_amount()

def tracking.validation.scores.signal_amount (   truths,
  predictions 
)
Score function: amount of signal of a classification

Definition at line 23 of file scores.py.

◆ signal_background_ratio()

def tracking.validation.scores.signal_background_ratio (   truths,
  predictions 
)
Score function: background / signal

Definition at line 95 of file scores.py.