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] PrecisionRecallCurve, ROC and AveragePrecision class interface #4549

Merged

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Nov 6, 2020

What does this PR do?

  • Add class interface PrecisionRecallCurve, ROC, AveragePrecision metrics
  • Unifies functional and class interface for the three metrics
  • Unifies binary and multiclass interface meaning that instead of having both a roc and multiclass_roc metric, we only have roc metric where the user would need to specify num_classes in multiclass tasks.
  • Adds multiclass support for average_precision metric
  • Support for multidim tensors
  • Much better testing, some where not tested at all

The PR is on the larger size, but the three metrics are connected and therefore needs to be updated in one go

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.
Before you start reviewing make sure you have read Review guidelines. In in short, see following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified; Bugfixes should be including in bug-fix release milestones (m.f.X) and features should be included in (m.X.b) releases.

Did you have fun?

Make sure you had fun coding 🙃

@pep8speaks
Copy link

pep8speaks commented Nov 6, 2020

Hello @SkafteNicki! Thanks for updating this PR.

Line 77:121: E501 line too long (130 > 120 characters)

Line 212:121: E501 line too long (130 > 120 characters)

Comment last updated at 2020-12-04 20:59:47 UTC

@codecov
Copy link

codecov bot commented Nov 6, 2020

Codecov Report

Merging #4549 (0d78912) into master (f23f5e5) will increase coverage by 0%.
The diff coverage is 96%.

@@           Coverage Diff           @@
##           master   #4549    +/-   ##
=======================================
  Coverage      93%     93%            
=======================================
  Files         124     129     +5     
  Lines        9299    9432   +133     
=======================================
+ Hits         8615    8739   +124     
- Misses        684     693     +9     

Copy link
Contributor

@teddykoker teddykoker left a comment

Choose a reason for hiding this comment

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

Amazing work @SkafteNicki, great job :)

@teddykoker
Copy link
Contributor

It seems SSIM tests are failing occasionally (I know you didn't touch it in this PR), do you think we should increase the tolerance? It is quite high already... I feel we might want to remove SSIM until it is actually implemented correctly

@SkafteNicki
Copy link
Member Author

@teddykoker, I would

  • Increase tolerance for now
  • Mention directly in docstring of SSIM that results may be a bit unstable
  • Open a issue and hope someone wants to tackle this

@Borda Borda added the feature Is an improvement or enhancement label Nov 8, 2020
Nicki Skafte added 2 commits November 23, 2020 11:33
@Borda Borda modified the milestones: 1.1, 1.1.x Nov 30, 2020
@Borda Borda added ready PRs ready to be merged priority: 1 Medium priority task design Includes a design discussion labels Nov 30, 2020
@Borda Borda requested a review from edenlightning as a code owner December 4, 2020 18:12
CHANGELOG.md Outdated Show resolved Hide resolved
@Borda Borda modified the milestones: 1.1.x, 1.1 Dec 4, 2020
@Borda Borda merged commit bf7c28c into Lightning-AI:master Dec 4, 2020
@SkafteNicki SkafteNicki deleted the metrics/classification_unification1 branch March 2, 2021 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Includes a design discussion feature Is an improvement or enhancement priority: 1 Medium priority task ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants