sed_eval.sound_event.EventBasedMetrics

class sed_eval.sound_event.EventBasedMetrics(event_label_list, evaluate_onset=True, evaluate_offset=True, t_collar=0.2, percentage_of_length=0.5, event_matching_type='optimal', **kwargs)[source]

Constructor

Parameters:

event_label_list : list

List of unique event labels

evaluate_onset : bool

Evaluate onset. Default value True

evaluate_offset : bool

Evaluate offset. Default value True

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

event_matching_type : str

Event matching type. Set ‘optimal’ for graph-based matching, or ‘greedy’ for always select first found match. Greedy type of event matching is kept for backward compatibility. Both event matching types produce very similar results, however, greedy matching can be sensitive to the order of reference events. Use default ‘optimal’ event matching, if you do not intend to compare your results to old results. Default value ‘optimal’

__init__(event_label_list, evaluate_onset=True, evaluate_offset=True, t_collar=0.2, percentage_of_length=0.5, event_matching_type='optimal', **kwargs)[source]

Constructor

Parameters:

event_label_list : list

List of unique event labels

evaluate_onset : bool

Evaluate onset. Default value True

evaluate_offset : bool

Evaluate offset. Default value True

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

event_matching_type : str

Event matching type. Set ‘optimal’ for graph-based matching, or ‘greedy’ for always select first found match. Greedy type of event matching is kept for backward compatibility. Both event matching types produce very similar results, however, greedy matching can be sensitive to the order of reference events. Use default ‘optimal’ event matching, if you do not intend to compare your results to old results. Default value ‘optimal’

Methods

__init__(event_label_list[, evaluate_onset, ...]) Constructor
class_wise_accuracy(event_label)
class_wise_count(event_label) Class-wise counts (Nref and Nsys)
class_wise_error_rate(event_label) Class-wise error rate metrics (error_rate, deletion_rate, and insertion_rate)
class_wise_f_measure(event_label) Class-wise f-measure metrics (f_measure, precision, and recall)
evaluate(reference_event_list, ...) Evaluate file pair (reference and estimated)
overall_accuracy([factor])
overall_error_rate() Overall error rate metrics (error_rate, substitution_rate, deletion_rate, and insertion_rate)
overall_f_measure() Overall f-measure metrics (f_measure, precision, and recall)
reset() Reset internal state
result_report_class_wise() Report class-wise results
result_report_class_wise_average() Report class-wise averages
result_report_overall() Report overall results
result_report_parameters() Report metric parameters
results() All metrics
results_class_wise_average_metrics() Class-wise averaged metrics
results_class_wise_metrics() Class-wise metrics
results_overall_metrics() Overall metrics
validate_offset(reference_event, estimated_event) Validate estimated event based on event offset
validate_onset(reference_event, estimated_event) Validate estimated event based on event onset