gat*_*ath 2 algorithm bayesian
基于这个网址,我发现了贝叶斯评级,这很好地解释了评级模型,我想总结一下公式,使任何人实现SQL语句都更容易.如果我总结这样的公式,这会是正确的吗?
avg_num_votes = Sum(votes)/Count(votes) * Count(votes)
avg_rating = sum(votes)/count(votes)
this_num_votes = count(votes)
this_rating = Positive_votes - Negative_votes
Run Code Online (Sandbox Code Playgroud)
迦特
它看起来更像是这样的:
avg_num_votes = Count(votes)/Count(items with at least 1 vote)
avg_rating = Sum(votes)/Count(items with at least 1 vote)
this_num_votes = Count(votes for this item)
this_rating = Sum(votes for this item)/Count(votes for this item)
Run Code Online (Sandbox Code Playgroud)
如果你使用简单的+/-系统,Sum(votes) = Count(positive votes)
(即将+视为1, - 为0)
另见:贝叶斯平均值.
归档时间: |
|
查看次数: |
3466 次 |
最近记录: |