@@ -324,12 +324,12 @@ def make_match_count_matrix(sorting1, sorting2, delta_frames, ensure_symmetry=Fa
324324 return match_event_counts_df
325325
326326
327- def make_agreement_scores (sorting1 , sorting2 , delta_frames ):
327+ def make_agreement_scores (sorting1 , sorting2 , delta_frames , ensure_symmetry = True ):
328328 """
329329 Make the agreement matrix.
330330 No threshold (min_score) is applied at this step.
331331
332- Note : this computation is symmetric.
332+ Note : this computation is symmetric by default .
333333 Inverting sorting1 and sorting2 give the transposed matrix.
334334
335335 Parameters
@@ -340,7 +340,9 @@ def make_agreement_scores(sorting1, sorting2, delta_frames):
340340 The second sorting extractor
341341 delta_frames: int
342342 Number of frames to consider spikes coincident
343-
343+ ensure_symmetry: bool, default: True
344+ If ensure_symmetry is True, then the algo is run two times by switching sorting1 and sorting2.
345+ And the minimum of the two results is taken.
344346 Returns
345347 -------
346348 agreement_scores: array (float)
@@ -356,7 +358,7 @@ def make_agreement_scores(sorting1, sorting2, delta_frames):
356358 event_counts1 = pd .Series (ev_counts1 , index = unit1_ids )
357359 event_counts2 = pd .Series (ev_counts2 , index = unit2_ids )
358360
359- match_event_count = make_match_count_matrix (sorting1 , sorting2 , delta_frames , ensure_symmetry = True )
361+ match_event_count = make_match_count_matrix (sorting1 , sorting2 , delta_frames , ensure_symmetry = ensure_symmetry )
360362
361363 agreement_scores = make_agreement_scores_from_count (match_event_count , event_counts1 , event_counts2 )
362364
0 commit comments