You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t_collar : float (0,]
Time collar used when evaluating validity of the onset and offset, in seconds. Default value 0.2
percentage_of_length : float in [0, 1]
Second condition, percentage of the length within which the estimated offset has to be in order to be consider valid estimation. Default value 0.5
The documentation for percentage_of_length suggests that is an "AND" condition, not an "OR" condition. However, the code indicates that the max is being used, which is also what mir_eval does:
# Detect field naming style used and validate onset
if 'event_offset' in reference_event and 'event_offset' in estimated_event:
annotated_length = reference_event['event_offset'] - reference_event['event_onset']
return math.fabs(reference_event['event_offset'] - estimated_event['event_offset']) <= max(t_collar, percentage_of_length * annotated_length)
elif 'offset' in reference_event and 'offset' in estimated_event:
annotated_length = reference_event['offset'] - reference_event['onset']
return math.fabs(reference_event['offset'] - estimated_event['offset']) <= max(t_collar, percentage_of_length * annotated_length)
I would suggest adapting the documentation for EventBasedMetrics based upon the mir_eval documentation for offset_ratio and offset_min_tolerance to make the sed_eval documentation clearer.
The text was updated successfully, but these errors were encountered:
The documentation for EventBasedMetrics is misleading.
It says:
The documentation for
percentage_of_length
suggests that is an "AND" condition, not an "OR" condition. However, the code indicates that the max is being used, which is also what mir_eval does:I would suggest adapting the documentation for EventBasedMetrics based upon the mir_eval documentation for
offset_ratio
andoffset_min_tolerance
to make the sed_eval documentation clearer.The text was updated successfully, but these errors were encountered: