Basic Metrics

class stonesoup.metricgenerator.basicmetrics.BasicMetrics(generator_name: str = 'basic_generator', tracks_key: str = 'tracks', truths_key: str = 'groundtruth_paths')[source]

Bases: MetricGenerator

Calculates simple metrics like number of tracks, truth and ratio of track-to-truth

Parameters:
  • generator_name (str, optional) – Unique identifier to use when accessing generated metrics from MultiManager

  • tracks_key (str, optional) – Key to access set of tracks added to MetricManager

  • truths_key (str, optional) – Key to access set of ground truths added to MetricManager. Or key to access a second set of tracks for track-to-track metric generation

generator_name: str

Unique identifier to use when accessing generated metrics from MultiManager

tracks_key: str

Key to access set of tracks added to MetricManager

truths_key: str

Key to access set of ground truths added to MetricManager. Or key to access a second set of tracks for track-to-track metric generation

compute_metric(manager, *args, **kwargs)[source]

Compute the metric using the data in the metric manager

Parameters:

manager (MetricManager) – containing the data to be used to create the metric(s)

Returns:

Contains the metric information

Return type:

list of Metric