How to balance number of ratings versus the ratings themselves?

前端 未结 4 1109
Happy的楠姐
Happy的楠姐 2020-12-23 23:36

For a school project, we\'ll have to implement a ranking system. However, we figured that a dumb rank average would suck: something that one user ranked 5 stars wou

4条回答
  •  一个人的身影
    2020-12-24 00:13

    A simple solution might be a weighted average:

    sum(votes) / number_of_votes

    That way, 3 people voting 1 star, and one person voting 5 would give a weighted average of (1+1+1+5)/4 = 2 stars.

    Simple, effective, and probably sufficient for your purposes.

提交回复
热议问题