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

[metrics] Accuracy error fix #3764

Merged
merged 3 commits into from
Oct 1, 2020

Conversation

SkafteNicki
Copy link
Member

What does this PR do?

Fixes #3006 and #2305
Throwing an error in accuracy if target tensor only consist of zeros is counter intuitive to many user and is also different from how sklearn handles this case. This PR remove this constrain.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

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 🙃

@pep8speaks
Copy link

pep8speaks commented Oct 1, 2020

Hello @SkafteNicki! Thanks for updating this PR.

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

Comment last updated at 2020-10-01 08:47:34 UTC

@mergify mergify bot requested a review from a team October 1, 2020 08:43
@mergify
Copy link
Contributor

mergify bot commented Oct 1, 2020

This pull request is now in conflict... :(

@codecov
Copy link

codecov bot commented Oct 1, 2020

Codecov Report

Merging #3764 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #3764   +/-   ##
======================================
  Coverage      89%     89%           
======================================
  Files         110     110           
  Lines        8554    8554           
======================================
  Hits         7637    7637           
  Misses        917     917           

@mergify mergify bot requested a review from a team October 1, 2020 09:21
@mergify mergify bot requested a review from a team October 1, 2020 10:58
@awaelchli awaelchli merged commit 9a7d1a1 into Lightning-AI:master Oct 1, 2020
@Borda Borda added bug Something isn't working Metrics labels Oct 1, 2020
@Borda Borda added this to the 0.10.0 milestone Oct 7, 2020
@SkafteNicki SkafteNicki deleted the metrics/accuracy_bug branch October 8, 2020 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accuracy metrics: In the case of all class indices of a target tensor is 0, throwing error.
6 participants