I would like some help to create a like / dislike sorting algorithm to find the best entries. I was thinking about how to do this, but there are two serious flaws in this method, and I would like to know if there is a better way.
Here's how I thought about it:
The entries will be sorted by the coefficient indicated by l/d , where l = number of likes and d = number of dislikes , so those with a higher coefficient will have more votes and deserve a higher place than those with low ratio.
There are two problems with this method:
1: if the hostility number is 0, l/d will be impossible. Thus, even if there are a thousand likes and 0 dislikes in the record, it still will not get on the scoreboard.
2: entries with a low number of likes and dislikes are an advantage over those with a lot of ratings, as it accepts a small number of ratings to influence the ratio and give a good rating.
What do you think?
EDIT : Here's a possible alternative that fixes the 1st issue: (l + 1) / (d + 1) . Any feedback on this?
source share