I run a calendar photo contest that uses a 5-star rating system which ranks the images according to their average rating. However, I would like to factor in the total number of votes a photo receives to get a more accurate ranking. For example, I do not want an image with 1 5-star vote (Avg rating: 5) getting ranked above an image with 10 5-star votes and 1 4-star vote (Avg rating: 4.9).
I know this topic has been raised before, but I can't seem to find a straightforward answer to apply to my particular situation. The Evan Miller site goes way over my head… I'm just looking for a simple calculation that gives more weight to images that receive a higher number of total votes.
The closest answer I've found is located here: What is a better way to sort by a 5 star rating?. My only problem with this solution is that I don't have a variable "m" in my scenario, and I don't know what kind of effect it will have if I arbitrarily assign a value to "m".
If I have the following variables, what formula should I use to achieve the type of ranking desired? Do I need to factor in anything else?
R: Average rating of image
v: Total Votes of image
C: Average rating of ALL images
Any help would be tremendously appreciated. Thanks!
You can simply calculate average score,
but it's better to add a correction for total number of votes given. One way to correct is to add "dummy" low votes (e.g. 10 ones), so
Photos with a large number of answers see their modified average alter very little from their real average, but photos with relatively few votes will see their modified average move considerably toward low values.
This is known as "Bayesian averaging". In effect, the photos with many answers will rank higher than photos with the same average but fewer votes.
I think I found an answer. So you just give a predefined number of downvotes to each item and that compensates slowly with the more votes the item gets. They weight the item gets is low but that doesn't matter in order to compare the weights. The best number of predefined downvotes I think would be the total number of votes for all items divided by the number of items (someone please fix it to ask for a list of items and rating, giving the proper number of downvotes).
In python:
pretend_votes = [50, 0, 0, 0, 0]
rating = [1, 2, 3, 4, 5]
def score(item_votes):
votes = [iv+pv for (iv,pv) in zip(item_votes,pretend_votes)]
return sum(v*u for (v,u) in zip(votes,rating))/float(sum(votes))
来源:https://stackoverflow.com/questions/32996104/ranking-contest-results-of-images-with-5-star-ratings