-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speedup audmetric.detection_error_tradeoff() #52
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
Great, this looks indeed much faster. What is a little bit problematic with >>> truth = [1, 0]
>>> prediction = [0.9, 0.1]
>>> detection_error_tradeoff(truth, prediction)
(array([1., 0.]), array([0., 0.]), array([0.1, 0.9])) Would it be possible to add a few more cases to |
Should be fine, I will add some cases. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks for adding a test.
As the pull request title will be used as the commit message when merging, it should only consist of 50 chars. I would propose to change the title of the pull request to: "Speedup audmetric.detection_error_tradeoff()" |
Co-authored-by: Hagen Wierstorf <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, looks all good now. Please go ahead and merge.
As Detection Error Tradeoff is often used for pairwise similarities, the input similarity truth vectors can be very large.
By convering parts of the
detection_error_tradeoff()
function tonumpy
, a meaningful acceleration can be achieved (see below).@hagenw