vocalpy.metrics.segmentation.ir

vocalpy.metrics.segmentation.ir#

Metrics for segmentation adapted from information retrieval.

Functions

concat_starts_and_stops(starts, stops)

Concatenate arrays of start and stop times into a single array of boundary times.

find_hits(hypothesis, reference[, ...])

Find hits in arrays of event times.

fscore(hypothesis, reference[, tolerance, ...])

Compute the F-score for a segmentation.

precision(hypothesis, reference[, ...])

Compute precision \(P\) for a segmentation.

precision_recall_fscore(hypothesis, ...[, ...])

Helper function that computes precision, recall, and the F-score.

recall(hypothesis, reference[, tolerance, ...])

Compute recall \(R\) for a segmentation.

Classes

IRMetricData(hits_ref, hits_hyp, diffs)

Class representing data used to compute an information retrieval metric.