Skip to content

How metrics penalise mistakes

The same mistake can cost everything under one metric and nothing under another. Each row below is one detector output, scored by the library against the same three reference events. Deeper red means more of the score is lost. Select a row to see the events.

MistakeEvent F1Segment F1Segment ERFrame F1PSDS1PSDS2
Exact1.001.000.001.001.001.00
Onsets 0.15 s late1.001.000.000.971.001.00
Onsets 0.4 s late0.001.000.000.921.001.00
One offset 1.5 s long0.670.890.250.911.001.00
One event split0.571.000.000.971.001.00
Two events merged0.400.940.120.941.001.00
One false alarm0.860.940.120.970.940.94
One event missed0.800.860.250.860.500.50
Wrong class0.670.500.500.500.000.00

What the table shows

  • Onsets 0.4 s late take event F1 to zero. Segment F1, the segment error rate and both PSDS profiles do not move.
  • Splitting one event costs event F1 heavily. Segment metrics do not see the 0.5 s hole, because every 1 s segment it touches still holds some detection.
  • Merging two events costs event F1 more than any other metric here. Both PSDS profiles accept the merged detection, since 80% of it lies on the references.
  • A missed event halves PSDS1 and PSDS2. One class drops to half its recall, and the spread between classes is subtracted from the mean.
  • A wrong class takes both PSDS profiles to zero. PSDS2 also charges a cross-trigger on top of the false positive.

These results hold for this example only. Collars, segment length, thresholds and the amount of audio all move the numbers.

Setup

Setting Value
References Two siren events (2 to 4 s, 5 to 7 s) and one speech event (10 to 14 s)
Clip 20 s, within 600 s of audio split into 20 s recordings
Event F1 0.2 s collars, offset ratio 0.2, micro average
Segment metrics 1 s segments, micro average
Frame F1 0.05 s frames, scores of 0 or 1, threshold 0.5, micro average
PSDS PSDS1 and PSDS2 profiles on the same binary scores

Binary scores give PSDS only one operating point besides the trivial ones. With real score curves it integrates over many; see PSDS.

Per-metric detail

Metric Page
Collars and matching Event F1
Segments and S/D/I Segment metrics
Thresholds and ranking Frame labels
Late score curves Frame events
Intersection criteria PSDS
Choice of post-processing piPSDS
Confidence Brier score
Alert delay Streaming protocol

Common questions

Which metric is strictest about timing?

In this comparison, event F1. Onsets 0.4 s late take it to zero while segment F1 and both PSDS profiles stay at 1.

Why can PSDS ignore a late onset?

PSDS asks how much of a detection and a reference overlap. A short delay leaves the overlap above its threshold.