Skip to content
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

Avoid zeros in dice and iou #2567

Merged
merged 13 commits into from
Jul 10, 2020
Merged

Avoid zeros in dice and iou #2567

merged 13 commits into from
Jul 10, 2020

Conversation

Borda
Copy link
Member

@Borda Borda commented Jul 9, 2020

What does this PR do?

Fixes #2545 better way that adding epsilon

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@Borda Borda added the feature Is an improvement or enhancement label Jul 9, 2020
@mergify mergify bot requested a review from a team July 9, 2020 12:31
@williamFalcon
Copy link
Contributor

it really should be an epsilon...

but in 16 bit 1e-15 is 0.... @Borda

@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #2567 into master will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #2567   +/-   ##
======================================
  Coverage      91%     91%           
======================================
  Files          70      70           
  Lines        5724    5753   +29     
======================================
+ Hits         5215    5242   +27     
- Misses        509     511    +2     

@Borda
Copy link
Member Author

Borda commented Jul 9, 2020

it really should be an epsilon...
but in 16 bit 1e-15 is 0.... @Borda

if you test that denom is not zero then you do not need any eps

EDIT: https://stackoverflow.com/a/9528486/4521646

import sys
sys.float_info.epsilon
2.220446049250313e-16

@Borda Borda added this to the 0.8.x milestone Jul 9, 2020
@Borda Borda requested review from justusschock and SkafteNicki July 9, 2020 17:17
@pep8speaks
Copy link

pep8speaks commented Jul 9, 2020

Hello @Borda! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-07-09 22:45:24 UTC

@williamFalcon williamFalcon merged commit 458bbad into master Jul 10, 2020
@Borda Borda deleted the metrics/nans branch July 10, 2020 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants