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

feat(favorites): modifying pray-and-pay ranking algorithm #5186

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

v-anne
Copy link
Contributor

@v-anne v-anne commented Mar 3, 2025

This PR follows up on a discussion related to the pray-and-pay ranking algorithm in #5111. The existing algorithm takes the geometric mean of the number of requests for a document and the average age of those requests. The way the code is currently written, the average age is always measured in seconds. That means for almost all documents, average age >>> number of requests, so a very old request will outweigh multiple recent requests for a different document.

To resolve this issue, the new algorithm first sorts by the number of requests for a document, and then breaks ties by sorting by number of views a particular docket (not document) has.

@v-anne v-anne marked this pull request as ready for review March 6, 2025 00:24
@v-anne
Copy link
Contributor Author

v-anne commented Mar 6, 2025

Not sure why the test is failing. I'd appreciate another set of eyes on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Do
Development

Successfully merging this pull request may close these issues.

2 participants