Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/spikeinterface/benchmark/benchmark_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ def run(self, **job_kwargs):
self.result = {"sorting": sorting, "spikes": spikes}
self.result["templates"] = self.templates

def compute_result(self, with_collision=False, **result_params):
def compute_result(self, with_collision=False, match_score=0.5, exhaustive_gt=True):
sorting = self.result["sorting"]
comp = compare_sorter_to_ground_truth(self.gt_sorting, sorting, exhaustive_gt=True)
comp = compare_sorter_to_ground_truth(
self.gt_sorting, sorting, exhaustive_gt=exhaustive_gt, match_score=match_score
)
self.result["gt_comparison"] = comp
if with_collision:
self.result["gt_collision"] = CollisionGTComparison(self.gt_sorting, sorting, exhaustive_gt=True)
Expand Down
6 changes: 4 additions & 2 deletions src/spikeinterface/benchmark/benchmark_merging.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ def run(self, **job_kwargs):

self.result["sorting"] = merged_analyzer.sorting

def compute_result(self, **result_params):
def compute_result(self, match_score=0.5, exhaustive_gt=True):
sorting = self.result["sorting"]
comp = compare_sorter_to_ground_truth(self.gt_sorting, sorting, exhaustive_gt=True)
comp = compare_sorter_to_ground_truth(
self.gt_sorting, sorting, exhaustive_gt=exhaustive_gt, match_score=match_score
)
self.result["gt_comparison"] = comp

_run_key_saved = [("sorting", "sorting"), ("merges", "pickle"), ("merged_pairs", "pickle"), ("outs", "pickle")]
Expand Down
6 changes: 4 additions & 2 deletions src/spikeinterface/benchmark/benchmark_sorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ def run(self):
sorting = NumpySorting.from_sorting(raw_sorting)
self.result = {"sorting": sorting}

def compute_result(self, exhaustive_gt=True):
def compute_result(self, match_score=0.5, exhaustive_gt=True):
# run becnhmark result
sorting = self.result["sorting"]
comp = compare_sorter_to_ground_truth(self.gt_sorting, sorting, exhaustive_gt=exhaustive_gt)
comp = compare_sorter_to_ground_truth(
self.gt_sorting, sorting, exhaustive_gt=exhaustive_gt, match_score=match_score
)
self.result["gt_comparison"] = comp

_run_key_saved = [
Expand Down