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

Enhanced dislike calculation algorithm #1077

Closed
1 of 2 tasks
Tali64 opened this issue Aug 19, 2024 · 1 comment
Closed
1 of 2 tasks

Enhanced dislike calculation algorithm #1077

Tali64 opened this issue Aug 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Tali64
Copy link

Tali64 commented Aug 19, 2024

Extension or Userscript?

Extension

Request or suggest a new feature!

In light of #1063 and #1066 (former resolved by Anarios, latter closed by author), I have been thinking about potential ways we could improve the way Return YouTube Dislike extrapolates dislikes. After brainstorming several expressions, here's what I came up with:

Let a be the public like count, b the private dislike count, c the extension user like count, and d the extension user dislike count. a/(a + b) is the actual like-to-dislike ratio. a/(a + d) will always be an overestimate of the actual ratio since d will always be less than or equal to b; c/(c + d) will always be less than or equal to a/(a + d). Thus, (a/(a + d) + c/(c + d))/2 should provide a better approximation of the like-to-dislike ratio in the majority of cases.

To recover the dislike count, we find the reciprocal of the like-to-dislike ratio, multiply by a, and subtract a (in other words, a * 1/(a/(a + b)) - a = a * (a + b)/a - a = a + b - a = b); applying the same steps to the estimated like-to-dislike ratio yields the formula 2a/(a/(a + d) + c/(c + d)) - a. This formula has an average error comparable to if not better than the current method in most cases: https://www.desmos.com/calculator/xoiubmt6ln; most importantly, it's far more accurate when a/(a + d) and c/(c + d) are far off from each other, since it takes both into account to produce a better approximation of the dislike count overall.

Ways to implement this!

No response

Can you work on this?

  • Yes
  • No

Will you be available for follow-up questions to help developers implement this?

Yes

@Tali64 Tali64 added the enhancement New feature or request label Aug 19, 2024
@Tali64
Copy link
Author

Tali64 commented Sep 18, 2024

After some consideration, the current algorithm is fine and probably doesn't need changing; however, I do have another suggestion that I will make a separate request for - linearly interpolating the dislike count between data updates. The API could be modified to add last updated date parameters and the last average rate of change per minute the dislike count increased by, so that when the updated is requested from the API, it can be approximated more accurately between stat updates rather than just standing still until the statistics are updated serverside.

@Tali64 Tali64 closed this as completed Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant