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

Fix bug in macro average for a number of classification metrics #1715

Closed
wants to merge 15 commits into from

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Apr 16, 2023

What does this PR do?

Fixes #1693
Fixes #1692
Fixes #1691
Fixes #1664

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
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 🙃

@SkafteNicki SkafteNicki marked this pull request as draft April 16, 2023 13:57
@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Apr 16, 2023
@SkafteNicki SkafteNicki added this to In progress in Classification refactor via automation Apr 16, 2023
@SkafteNicki SkafteNicki added this to the v1.0.0 milestone Apr 16, 2023
@SkafteNicki SkafteNicki changed the title fix impl Fix bug in macro average for a number of classification metrics Apr 16, 2023
Copy link

@JohannesK14 JohannesK14 Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I know I created #1693 (comment) and suggest a IoU of 1.0 if a class is neither present in target nor prediction, but I am not that sure anymore.

Doing so quietly might lead to overly optimistic values.

As I showed in #1693 (comment), the JaccardIndex internally updates a confusion matrix over all batches, which results in the correct values, if a final compute() is called after the validation/testing epoch.

@ioangatop
Copy link

ioangatop commented May 10, 2023

Hi @SkafteNicki @Borda @JohannesK14 thank you for the fix and / or review! I wanted to ask the state of this PR, because I also experience the issue :/

@SkafteNicki
Copy link
Member Author

@ioangatop I am currently working on it locally. Nearly done, but I have some unit tests that are still failing which I need to debug. Hopefully, get it done before the end of this week and I make sure that it is done before v1.0 release.

@SkafteNicki SkafteNicki closed this Jun 3, 2023
Classification refactor automation moved this from In progress to Done Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working
Projects
No open projects
4 participants