-
Notifications
You must be signed in to change notification settings - Fork 426
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
Information Retrieval (3/5) #139
Information Retrieval (3/5) #139
Conversation
Codecov Report
@@ Coverage Diff @@
## master #139 +/- ##
==========================================
+ Coverage 96.68% 96.76% +0.07%
==========================================
Files 152 156 +4
Lines 4762 4816 +54
==========================================
+ Hits 4604 4660 +56
+ Misses 158 156 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Changed also the test of MRR to compare against the sklearn implementation instead of mine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smaller comments else LGTM
Co-authored-by: Nicki Skafte <[email protected]>
@lucadiliello tests seems to be failing (missing import I think). Could you look into it? :] |
@@ -21,7 +20,7 @@ | |||
class RetrievalMRR(RetrievalMetric): | |||
""" | |||
Computes `Mean Reciprocal Rank | |||
<https://en.wikipedia.org/wiki/Mean_reciprocal_rank>`_. | |||
<https://en.wikipedia.org/wiki/Mean_reciprocal_rank>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<https://en.wikipedia.org/wiki/Mean_reciprocal_rank>`__. | |
<https://en.wikipedia.org/wiki/Mean_reciprocal_rank>`__. |
is this the correct link formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I receive an error when doing make docs
if I use a single underscore. This is probably caused by having the same link to wikipedia 2 times: 1 link in the Metric class and one in the functional version.
The error is:
/Users/lucadiliello/development/metrics/torchmetrics/functional/retrieval/reciprocal_rank.py:docstring of torchmetrics.functional.retrieval.reciprocal_rank.retrieval_reciprocal_rank:22: WARNING: Duplicate explicit target name: "here".
So I found that by using 2 underscores it does work.
Before submitting
What does this PR do?
Implements Precision (@k) for Information Retrieval. More info here.
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 🙃