-
Notifications
You must be signed in to change notification settings - Fork 103
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
Compute p@10 using 0 == irrel, 1+ == rel, so that P@10 is in the expected range [0..1] #991
Conversation
…cted range [0..1]
How about a clicky clicky, @epugh |
Okay, getting some JS errors.... |
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.
Two tweaks to javascript for formatting, and one line I can't get to load...
db/scorers/p@10.js
Outdated
} | ||
total = total + 1 | ||
}, k); | ||
const score = count / total : 0.0; |
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.
This line gives me an error...
db/scorers/p@10.js
Outdated
if (hasDocRating(i) && (docRating(i)) > 0) { // map 0 -> irrel, 1+ ->rel | ||
count = count i+1 | ||
} | ||
total = total + 1 |
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.
total = total + 1 | |
total = total + 1; |
db/scorers/p@10.js
Outdated
let count = 0, total = 0; | ||
eachDoc(function(doc, i) { | ||
if (hasDocRating(i) && (docRating(i)) > 0) { // map 0 -> irrel, 1+ ->rel | ||
count = count i+1 |
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.
count = count i+1 | |
count = count + 1; |
P@10 when used with multivalued judgements should still produce a score between 0 and 1.
Description
Motivation and Context
How Has This Been Tested?
Screenshots or GIFs (if appropriate):
Types of changes
Checklist: