我应该如何订购这些“有帮助”的产品?分数?
在我的网站上用户生成的帖子下,我有一个类似亚马逊的评级系统:
Was this review helpful to you: Yes | No
如果有投票,我会在该行上方显示结果,如下所示:
5 of 8 people found this reply helpful.
我想根据这些排名对帖子进行排序。如果您按照从最有帮助到最没有帮助的顺序进行排名,您会如何排列以下帖子?
a) 1/1 = 100% helpful
b) 2/2 = 100% helpful
c) 999/1000 = 99.9% helpful
b) 3/4 = 75% helpful
e) 299/400 = 74.8% helpful
显然,仅根据有用百分比进行排序是不对的,应该以某种方式将总票数考虑在内。是否有标准方法可以做到这一点?
更新:
使用 Charles 的公式计算 Agresti-Coull 下限并对其进行排序,这就是上面示例的排序方式:
1) 999/1000 (99.9%) = 95% likely to fall in 'helpfulness' range of 99.2% to 100%
2) 299/400 (74.8%) = 95% likely to fall in 'helpfulness' range of 69.6% to 79.3%
3) 3/4 (75%) = 95% likely to fall in 'helpfulness' range of 24.7% to 97.5%
4) 2/2 (100%) = 95% likely to fall in 'helpfulness' range of 23.7% to 100%
5) 1/1 (100%) = 95% likely to fall in 'helpfulness' range of 13.3% to 100%
直观上,这感觉是正确的。
更新2:
从应用程序的角度来看,我不想每次提取帖子列表时都运行这些计算。我想我要么按照定期的、cron 驱动的时间表更新和存储 Agresti-Coull 下限(仅更新自上次运行以来收到投票的帖子),要么在收到新投票时更新它。
Under the user generated posts on my site, I have an Amazon-like rating system:
Was this review helpful to you: Yes | No
If there are votes, I display the results above that line like so:
5 of 8 people found this reply helpful.
I would like to sort the posts based upon these rankings. If you were ranking from most helpful to least helpful, how would you order the following posts?
a) 1/1 = 100% helpful
b) 2/2 = 100% helpful
c) 999/1000 = 99.9% helpful
b) 3/4 = 75% helpful
e) 299/400 = 74.8% helpful
Clearly, its not right to sort just on the percent helpful, somehow the total votes should be factored in. Is there a standard way of doing this?
UPDATE:
Using Charles' formulas to calculate the Agresti-Coull lower range and sorting on it, this is how the above examples would sort:
1) 999/1000 (99.9%) = 95% likely to fall in 'helpfulness' range of 99.2% to 100%
2) 299/400 (74.8%) = 95% likely to fall in 'helpfulness' range of 69.6% to 79.3%
3) 3/4 (75%) = 95% likely to fall in 'helpfulness' range of 24.7% to 97.5%
4) 2/2 (100%) = 95% likely to fall in 'helpfulness' range of 23.7% to 100%
5) 1/1 (100%) = 95% likely to fall in 'helpfulness' range of 13.3% to 100%
Intuitively, this feels right.
UPDATE 2:
From an application point of view, I don't want to be running these calculations every time I pull up a list of posts. I'm thinking I'll either update and store the Agresti-Coull lower bound either on a regular, cron-driven schedule (updating only those posts which have received a vote since the last run) or update it whenever a new vote is received.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对于每篇文章,请设定您期望它有多大帮助的界限。我更喜欢使用 Agresti-Coull 间隔。伪代码:
然后取估计的较低端并对其进行排序。因此,2/2(由 Agresti-Coull 提出)有 95% 的可能性落在“有用性”范围 23.7% 到 100% 内,因此它低于 999/1000,其范围为 99.2% 到 100%(因为 0.237 < .992)。
编辑:由于有些人似乎发现这很有帮助(哈哈),所以我要指出的是,可以根据您想要的自信/规避风险的程度来调整算法。您需要的信心越少,您就越愿意放弃“经过验证”(高票)的评论,而转向未经测试但高分的评论。 90% 置信区间得出的 kappa = 1.95996398,85% 置信区间得出的结果为 1.78046434,75% 置信区间得出的结果为 1.53412054,完全谨慎的 50% 置信区间得出的结果为 1.15034938。
50% 置信区间
总体上并没有太大不同,但它确实更喜欢 2/2,而不是 3/4 的安全性。
For each post, generate bounds on how helpful you expect it to be. I prefer to use the Agresti-Coull interval. Pseudocode:
Then take the lower end of the estimate and sort on this. So the 2/2 is (by Agresti-Coull) 95% likely to fall in the 'helpfulness' range 23.7% to 100%, so it sorts below the 999/1000 which has range 99.2% to 100% (since .237 < .992).
Edit: Since some people seem to have found this helpful (ha ha), let me note that the algorithm can be tweaked based on how confident/risk-averse you want to be. The less confidence you need, the more willing you will be to abandon the 'proven' (high-vote) reviews for the untested but high-scoring reviews. A 90% confidence interval gives kappa = 1.95996398, an 85% confidence interval gives 1.78046434, a 75% confidence interval gives 1.53412054, and the all-caution-to-the-wind 50% confidence interval gives 1.15034938.
The 50% confidence interval gives
which isn't that different overall, but it does prefer the 2/2 to the safety of the 3/4.
这个问题可能最好在 http://stats.stackexchange.com 上提出。
我猜你仍然想通过增加“帮助”来订购。
如果您想知道给定数字的精确度,最简单的方法是使用 二项分布,其中
n
等于响应总数,p
为“有帮助”的响应分数。This question is probably better asked on http://stats.stackexchange.com .
I guess you still want to order by increasing of 'helpfulness'.
If you want to know how precise a given number is, the simplest way is to use the square root of the variance of the Binomial distribution with
n
equal to the total number of responses andp
the fraction of responses which were 'helpful'.一个非常简单的解决方案是忽略所有少于截止票数的内容,然后按百分比排序。
例如(需要至少五票)
A very simple solution would be to ignore everything with less than a cut-off amount of votes, and then sort by percentage.
For example (require at least five votes)
这取决于预期的积极反馈率和平均投票人数。
如果像你给出的例子一样,有时会有 5 到 10 人投票,有时有 1000 人投票,那么我会建议威尔逊中点:
It depends on the expected rate of positive feedback and the number of the people that vote on average.
If, like in the example you give, you are going to have sometimes 5 and 10 people voting and other times a 1000, then I would suggest the Wilson midpoint: