pyannote / pyannote-metrics

A toolkit for reproducible evaluation, diagnostic, and error analysis of speaker diarization systems
http://pyannote.github.io/pyannote-metrics
MIT License
184 stars 32 forks source link

errors + correct do not sum to 100% - is this by design? #7

Closed chananshgong closed 7 years ago

chananshgong commented 7 years ago

According to the DER tutorial here: http://www.xavieranguera.com/phdthesis/node108.html The FA + MD + CONFUSION should all add up to the DER.

However, in the example here: {u'confusion': 7.0, u'correct': 22.0, u'diarization error rate': 0.5161290322580645, u'false alarm': 7.0, u'missed detection': 2.0, u'total': 31.0} The DER is 0.5161290322580645 , and multiplying by total 31, one get 16, which indeed is the sum of confusion + false alarm + missed detection. However, adding correct (21) to errors (16) is 37 which is more than 100% (total =31)

hbredin commented 7 years ago

Yes. This is by design.

Also note that DER may be greater than 1 in some cases. This is due to the fact that the denominator (total) is the total duration of speech in the reference, not the total duration of the file.

chanansh commented 7 years ago

But why don't correct + FA + MD + confused = total?is total the reference while the sum above is of the hypothesis total?

hbredin commented 7 years ago

OK. Let's summarize:

Overall, you can sum those values as follows:

chanansh commented 7 years ago

Thanks. Can you please add this to the documentation or comment in the code? Thanks for contributing this package.

hbredin commented 7 years ago

I'd be happy to merge a pull request updating DiarizationErrorRate's docstring.