traccuracy.metrics._basic

Module Contents

Classes

BasicMetrics

Generates basic statistics describing node and edge errors

class traccuracy.metrics._basic.BasicMetrics[source]

Generates basic statistics describing node and edge errors

If relax_skips_gt or relax_skips_pred is True, we can match skip edges in the prediction to a series of edges in the gt, or vice versa. The total number of skip TPs/FNs/FPs will be reported and these counts will be incorporated in the calculation of precision/recall/F1.

These metrics are written assuming that the ground truth annotations are dense. If that is not the case, interpret the numbers carefully. Consider eliminating metrics that use the number of false positives.

property info: dict[str, Any]

Dictionary with Metric name and any parameters

compute(matched: traccuracy.matchers._matched.Matched, override_matcher: bool = False, relax_skips_gt: bool = False, relax_skips_pred: bool = False) traccuracy.metrics._results.Results

The compute methods of Metric objects return a Results object populated with results and associated metadata

Parameters:
  • matched (traccuracy.matchers.Matched) – Matched data object to compute metrics on

  • override_matcher (bool) – If True, the metric will not validate the matcher type

  • relax_skips_gt (bool) – If True, the metric will check if skips in the ground truth graph have an equivalent multi-edge path in predicted graph

  • relax_skips_pred (bool) – If True, the metric will check if skips in the predicted graph have an equivalent multi-edge path in ground truth graph

Returns:

Object containing metric results

and associated pipeline metadata

Return type:

traccuracy.metrics._results.Results