需要帮助的喜欢/不喜欢投票系统 [英] Need help on like/dislike voting system
问题描述
我想获得一些帮助建立一个喜欢/不喜欢排序算法找到最好的作品。我想到了一个办法做到这一点,但也有使用这种方法的两大缺陷,我想知道是否有什么更好的办法。
I'd like to get some help to build a like/dislike sorting algorithm to find the best entries. I thought about a way to do it, but there are two major flaws with this method and I'd like to know if there's any better way.
下面就是我想过这样做:
Here's how I thought about doing it:
该项目将通过升/天
,其中 L =喜欢的号码
和给出的比例进行排序 D =不喜欢的数量
,让那些具有较高的比例有一个更大的喜欢算,值得一越往上地方比那些低比率。
The entries would be sorted by the ratio given by l/d
where l = number of likes
and d = number of dislikes
, so that those with a higher ratio have a bigger likes count and deserve a higher up place than those with a low ratio.
有两个问题用这种方法:
There are two issues with this method:
1 如果不喜欢的号码是0 升/天
将是不可能的。因此,即使一个项目有一千个喜欢的和不喜欢0它仍然不会得到任何地方进入记分牌。
1: if the number of dislikes is 0 the l/d
will be impossible. So even if an entry has a thousand of likes and 0 dislikes it still won't get any place into the scoreboard.
2 与好恶低量条目的优点在于与那些拥有许多收视率比较,因为它需要收视率影响的比例,给入门的好低量比分。
2: entries with a low amount of likes and dislikes are at an advantage in comparison with those with many ratings since it takes a low amount of ratings to influence the ratio and give the entry a good score.
你怎么看?
修改:下面是修复了第一个问题,一个可能的选择:(L + 1)/(D + 1)
。就这一个任何反馈?
EDIT: Here's a possible alternative that fixes the 1st issue: (l + 1) / (d + 1)
. Any feedback on this one?
推荐答案
这可能是相关的:的如何不至按平均评分。
这篇关于需要帮助的喜欢/不喜欢投票系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!