From ddad9036625bba553164dbfbf92ad43d21002e86 Mon Sep 17 00:00:00 2001 From: Julien Verplanken Date: Thu, 29 Aug 2024 08:58:18 +0200 Subject: [PATCH 1/2] fix print_summary for reporting when not exhaustive_gt --- src/spikeinterface/comparison/paircomparisons.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/spikeinterface/comparison/paircomparisons.py b/src/spikeinterface/comparison/paircomparisons.py index 7d5f04dfdd..248af3d7e0 100644 --- a/src/spikeinterface/comparison/paircomparisons.py +++ b/src/spikeinterface/comparison/paircomparisons.py @@ -455,13 +455,13 @@ def print_summary(self, well_detected_score=None, redundant_score=None, overmerg d = dict( num_gt=len(self.unit1_ids), num_tested=len(self.unit2_ids), - num_well_detected=self.count_well_detected_units(well_detected_score), - num_redundant=self.count_redundant_units(redundant_score), - num_overmerged=self.count_overmerged_units(overmerged_score), + num_well_detected=self.count_well_detected_units(well_detected_score) ) if self.exhaustive_gt: txt = txt + _template_summary_part2 + d["num_redundant"] = self.count_redundant_units(redundant_score) + d["num_overmerged"] = self.count_overmerged_units(overmerged_score) d["num_false_positive_units"] = self.count_false_positive_units() d["num_bad"] = self.count_bad_units() @@ -676,11 +676,11 @@ def count_units_categories( GT num_units: {num_gt} TESTED num_units: {num_tested} num_well_detected: {num_well_detected} -num_redundant: {num_redundant} -num_overmerged: {num_overmerged} """ -_template_summary_part2 = """num_false_positive_units {num_false_positive_units} +_template_summary_part2 = """num_redundant: {num_redundant} +num_overmerged: {num_overmerged} +num_false_positive_units {num_false_positive_units} num_bad: {num_bad} """ From 3dbba3870b40b1fe4684f792a9222fa23a882275 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 07:17:16 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/spikeinterface/comparison/paircomparisons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spikeinterface/comparison/paircomparisons.py b/src/spikeinterface/comparison/paircomparisons.py index 248af3d7e0..fa5ec2d3d0 100644 --- a/src/spikeinterface/comparison/paircomparisons.py +++ b/src/spikeinterface/comparison/paircomparisons.py @@ -455,7 +455,7 @@ def print_summary(self, well_detected_score=None, redundant_score=None, overmerg d = dict( num_gt=len(self.unit1_ids), num_tested=len(self.unit2_ids), - num_well_detected=self.count_well_detected_units(well_detected_score) + num_well_detected=self.count_well_detected_units(well_detected_score), ) if self.exhaustive_gt: