All problems
Diarization Error Rate
Problem
Return the diarization error rate: (miss + false alarm + speaker error) seconds divided by the reference speech duration.
Return 0.0 when the reference duration is not positive. The three error terms are summed before normalizing.
Hint
Miss, false alarm, and speaker confusion errors all count toward the numerator.
Test cases
case 1
in: [1,2,3,10]
expected: 0.6
case 2
in: [0,0,0,5]
expected: 0
case 3
in: [5,0,0,0]
expected: 0
case 4
in: [2,2,2,2]
expected: 3
case 5
in: [0,0,1,4]
expected: 0.25
Starter codePython
def diarization_der(miss_sec, false_alarm_sec, speaker_error_sec, reference_speech_sec):
# Your code here
pass5 test cases · run your code against them in the editor