This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed this when a user asked me to explain the meaning of the numbers in our pagerank export, and figured I may as well throw in a fix --
The code to generate pagerank percentiles was obviously intended to give all cases with the same pagerank the same percentile score, but missing a
last_score = score
line. The upshot is that row one gets a percentile of 1/n, row 2 gets a percentile of 2/n, etc, instead of them all having the same percentile if they have the same score:This just puts in the missing assignment so those would all have percentile 0.0. Note this has the largest effect on the lowest-ranked cases -- about a third of our cases have the same lowest pagerank, so case 1.7 million has a percentile of 33% when it should be 0%. After that there's more gradation so there's less effect from this bug.