:orphan: :py:mod:`traccuracy.metrics._ctc` ================================= .. py:module:: traccuracy.metrics._ctc Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: traccuracy.metrics._ctc.AOGMMetrics traccuracy.metrics._ctc.CTCMetrics Functions ~~~~~~~~~ .. autoapisummary:: traccuracy.metrics._ctc.get_weighted_vertex_error_sum traccuracy.metrics._ctc.get_weighted_edge_error_sum traccuracy.metrics._ctc.get_weighted_error_sum .. py:class:: AOGMMetrics(vertex_ns_weight: float = 1, vertex_fp_weight: float = 1, vertex_fn_weight: float = 1, edge_fp_weight: float = 1, edge_fn_weight: float = 1, edge_ws_weight: float = 1) Computes the Acyclic Oriented Graph Measure (AOGM), along with the error counts The AOGM metric is a generalized graph measure that allows users to define their own error weights for each type of node and edge error. The AOGM is simply the weighted sum of all errors. 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. :param vertex_ns_weight: Weight for vertex/node non-split errors. Defaults to 1 :type vertex_ns_weight: float :param vertex_fp_weight: Weight for false positive vertex/node errors. Defaults to 1 :type vertex_fp_weight: float :param vertex_fn_weight: Weight for false negative vertex/node errors. Defaults to 1 :type vertex_fn_weight: float :param edge_fp_weight: Weight for false positive edge errors. Defaults to 1 :type edge_fp_weight: float :param edge_fn_weight: Weight for false negative edge errors. Defaults to 1 :type edge_fn_weight: float :param edge_ws_weight: Weight for wrong semantic edge errors. Defaults to 1 :type edge_ws_weight: float .. py:property:: info :type: dict[str, Any] Dictionary with Metric name and any parameters .. py:method:: 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 :param matched: Matched data object to compute metrics on :type matched: traccuracy.matchers.Matched :param override_matcher: If True, the metric will not validate the matcher type :type override_matcher: bool :param relax_skips_gt: If True, the metric will check if skips in the ground truth graph have an equivalent multi-edge path in predicted graph :type relax_skips_gt: bool :param relax_skips_pred: If True, the metric will check if skips in the predicted graph have an equivalent multi-edge path in ground truth graph :type relax_skips_pred: bool :returns: Object containing metric results and associated pipeline metadata :rtype: traccuracy.metrics._results.Results .. py:class:: CTCMetrics Computes the original Cell Tracking Challenging metrics: TRA, DET, LNK. These metrics are based on the more general AOGM metric. - DET: Assesses detection performance - LNK: Assesses linking performance by measuring only edge errors - TRA: Assesses both detection and tracking performance 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. .. py:property:: info :type: dict[str, Any] Dictionary with Metric name and any parameters .. py:method:: 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 :param matched: Matched data object to compute metrics on :type matched: traccuracy.matchers.Matched :param override_matcher: If True, the metric will not validate the matcher type :type override_matcher: bool :param relax_skips_gt: If True, the metric will check if skips in the ground truth graph have an equivalent multi-edge path in predicted graph :type relax_skips_gt: bool :param relax_skips_pred: If True, the metric will check if skips in the predicted graph have an equivalent multi-edge path in ground truth graph :type relax_skips_pred: bool :returns: Object containing metric results and associated pipeline metadata :rtype: traccuracy.metrics._results.Results .. py:function:: get_weighted_vertex_error_sum(vertex_error_counts: dict[str, float], vertex_ns_weight: float = 1, vertex_fp_weight: float = 1, vertex_fn_weight: float = 1) -> float .. py:function:: get_weighted_edge_error_sum(edge_error_counts: dict[str, float], edge_fp_weight: float = 1, edge_fn_weight: float = 1, edge_ws_weight: float = 1) -> float .. py:function:: get_weighted_error_sum(vertex_error_counts: dict[str, float], edge_error_counts: dict[str, float], vertex_ns_weight: float = 1, vertex_fp_weight: float = 1, vertex_fn_weight: float = 1, edge_fp_weight: float = 1, edge_fn_weight: float = 1, edge_ws_weight: float = 1) -> float