Project:Voting API
Version:6.x-2.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:bayesian

Issue Summary

trying to resolve the age old problem of items with few votes climbing to the top based on average votes. total points isn't bad as a surrogate for more complex calculations, but it isn't great either.

the bayesian formula as follows take into account the average number of votes every item received, and the average rating of every item using that to weight against this item.

br = ( (avg_num_votes * avg_rating) + (this_num_votes * this_rating) ) / (avg_num_votes + this_num_votes)

obviously to implement, this would have to be coded as a relationship. where would i look for the appropriate code to edit? hacking into the total points relationship would probably be the quickest way. thanks for your help.

Comments

#1

Cross posting gee proud's post in the FiveStar topic, as it covers the issue quite well, and words my thoughts on the issue better then I could myself.

~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~

I've glanced through fivestar issues and the issue of Total Vote Count vs. average has been talked about but I haven't seen a clear discussion about tying the votes to an existing average to reduce outliers.

Example:

PHOTO A has 1 vote @ 10 stars (10 star ranking)
PHOTO B has 2 votes @ 9 stars (9 star ranking)

Which is more representative? Also, most people aren't inclined to rate content that is bad (why would someone look at something they weren't interested in or didn't like?) so a lot of rankings skew towards the high end of Fivestar.

Proposal:

Use the concept of the Bayesian Average to help weigh the rankings to be more representative
http://en.wikipedia.org/wiki/Bayesian_average

Concept:

You would need to determine the weighted average to base the calculation and how much the average would weigh on the votes.

Example: For 1-10 star ranking, the website admin decides to use 5 stars as the weighted average for a certain number of votes (say 10 votes). This makes 1 vote for 10 stars have far less impact than before without the weight:

(5 stars x 10 votes + 10 stars x 1 votes )/11 votes = 5.45 stars

Fivestar Tools:

In the Fivestar Module, there could be the option to pre-load a content type with a weighted average of votes, such as have the content type start with 10 votes of 5 stars. These numbers would be selected by the Admin.

Additionally, it could be automated by changing as the # of votes occur, throughout the website or content type. This could be implemented by finding the average number of votes per node (say like 10 votes) and using the average of the range of votes (5 for 1-10, 2.5 for 1-5, etc) for the values.The site admin would just enable/disable the function. This could conceptually be tweaked to reduce the impact of weight:

(avg votes x .1 [arbitrary modifier, could be .3 or .5]) + (votes x stars) / (votes + (avg votes x .1 [arbitrary modifier])) = dynamic weighted star ranking that changes as the number of votes do throughout the content type / website.

Just a Thought:
I've used drupal for about two years now (off and on) without PHP coding anything so I really don't understand the back end of how a lot of this stuff works. I didn't see a lot of discussion about this so I thought I would bring it forward. I think this is valuable for people that want rankings but don't have thousands of users ranking nodes to quickly create a representative star ranking.

My Website that uses FiveStar:
http://www.thirdgoal.info

Example of unweighted rankings:
http://thirdgoal.info/allphotos/list?tid=All
(the highest ranked images aren't the most voted upon and aren't representative of the field)

nobody click here