I have implemented a simple up / down voting system on the website, and I keep track of individual votes, as well as the voting time and unique user iD (hashed IP address).
My question is not how to calculate the percentage or amount of votes - but more, what is a good algorithm for determining a good score based on the votes?
I believe that sorting with a pure voice of interest is unacceptable, as well as just a vote count.
Consider the following example:
- Image A: 4 upvotes, 1 downvotes
- Image B: 5 revs, 4 downvotes
- Image C: 1 upvote, 0 downvotes
An ideal system would put A first, possibly after B, then C.
In a purely percentage scenario, the order is C> A> B. (incorrect) In the scenario of pure vote counting, the order is B> A> C. (incorrect)
I have an idea for a somewhat "hybrid" algorithm based on the confidence of the system in points, maybe something like:
// (if totalvotes > 0, else score = 0) score = 1 - ((downvotes+1 / totalvotes+1) * sqrt(1 / totalvotes))
However, I was hoping to ask the community if there are any really well-defined algorithms that I just don’t know before I sit, tuning my algorithm from now on until sunset.
I also have date data for each vote, but the site’s content is not very time sensitive, so I really don’t need to sort “what's hot” at all.
source share