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

multilabel for AveragePrecision #386

Merged
merged 12 commits into from
Jul 24, 2021

Conversation

discort
Copy link
Contributor

@discort discort commented Jul 18, 2021

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 to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #359

PR review

@Borda @SkafteNicki

Did you have fun?

⚡⚡⚡

@codecov
Copy link

codecov bot commented Jul 18, 2021

Codecov Report

Merging #386 (49ed27a) into master (73d11e6) will increase coverage by 19.60%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #386       +/-   ##
===========================================
+ Coverage   76.68%   96.29%   +19.60%     
===========================================
  Files         118      118               
  Lines        3719     3722        +3     
===========================================
+ Hits         2852     3584      +732     
+ Misses        867      138      -729     
Flag Coverage Δ
Linux 76.67% <75.00%> (-0.01%) ⬇️
Windows 76.67% <75.00%> (-0.01%) ⬇️
cpu 76.67% <75.00%> (-0.01%) ⬇️
gpu 96.29% <100.00%> (?)
macOS 76.67% <75.00%> (-0.01%) ⬇️
pytest 96.29% <100.00%> (+19.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...unctional/classification/precision_recall_curve.py 91.02% <100.00%> (+5.69%) ⬆️
torchmetrics/regression/r2.py 94.28% <0.00%> (+2.85%) ⬆️
torchmetrics/regression/explained_variance.py 97.05% <0.00%> (+2.94%) ⬆️
torchmetrics/classification/average_precision.py 96.87% <0.00%> (+3.12%) ⬆️
...chmetrics/classification/precision_recall_curve.py 96.87% <0.00%> (+3.12%) ⬆️
torchmetrics/classification/roc.py 96.77% <0.00%> (+3.22%) ⬆️
torchmetrics/utilities/enums.py 100.00% <0.00%> (+3.44%) ⬆️
torchmetrics/regression/pearson.py 100.00% <0.00%> (+3.84%) ⬆️
torchmetrics/regression/spearman.py 100.00% <0.00%> (+3.84%) ⬆️
torchmetrics/classification/confusion_matrix.py 96.15% <0.00%> (+3.84%) ⬆️
... and 68 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73d11e6...49ed27a. Read the comment docs.

@discort discort force-pushed the average_precision_multiclass branch from 6d7b761 to 64ace03 Compare July 18, 2021 20:33
@Borda Borda added the enhancement New feature or request label Jul 19, 2021
@pep8speaks
Copy link

pep8speaks commented Jul 19, 2021

Hello @discort! Thanks for updating this PR.

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

Comment last updated at 2021-07-24 19:56:51 UTC

@discort discort requested a review from Borda July 20, 2021 09:44
@Borda Borda added the ready label Jul 20, 2021
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

nice!
it compiled without errors

@Borda Borda enabled auto-merge (squash) July 20, 2021 14:23
Copy link
Member

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

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

Implementation looks good, but could we try to fit this testcase inside the already established testing framework?

tests/classification/test_average_precision.py Outdated Show resolved Hide resolved
auto-merge was automatically disabled July 23, 2021 17:04

Head branch was pushed to by a user without write access

@discort discort requested a review from SkafteNicki July 24, 2021 07:55
@Borda Borda enabled auto-merge (squash) July 24, 2021 15:57
@Borda Borda removed the ready label Jul 24, 2021
@Borda
Copy link
Member

Borda commented Jul 24, 2021

@SkafteNicki mind revisit?

Copy link
Member

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

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

LGTM :]

@Borda Borda merged commit dfc8f76 into Lightning-AI:master Jul 24, 2021
@discort discort deleted the average_precision_multiclass branch July 27, 2021 09:47
@Borda Borda added this to the v0.5 milestone Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing labels in (n_samples, n_classes) to AveragePrecision
5 participants