drpogkqqi536984960 2015-06-23 07:23
浏览 22

星级评分系统如何运作?

What I want is to know how star ratings works. I don't get the logic of it.

Example:

5 star - 300 people  
4 star - 45 people  
3 star - 100 people  
2 star - 99 people  
1 star - 10 people  

Total of 554 people

I want to convert these number of votes to percentage and compute all of it to get its average

5 star - 40% (300 people)  
4 star - 10% (45 people)  
3 star - 21% (100 people)  
2 star - 20 % (99 people)  
1 star - 9% (10 people)

a total of 100%

It's just a random percentage. It's not the correct answer.

How can I achieve that ? I don't think if that's the correct process of ratings.

  • 写回答

3条回答 默认 最新

  • dongqi8114 2015-06-23 07:46
    关注

    First of all get total no of people vote.

    and use this function to show percentage.

    star percentage = star total people vote * 100 / total no of people vote.
    

    for example if you want to get 5 star rate percentage then

    5 star percentage = 300 * 100 / 554

    评论

报告相同问题?

悬赏问题

  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)