有什么算法可以确保社交排名系统中的类别多样性?
我正在构建一个类似于 Reddit 的系统,用户可以在其中“喜欢”项目。 “喜欢”将用于确定项目的排名。还有一个“老化”因素,即最近的“喜欢”比以前的“喜欢”更重要。
总而言之,它与此处描述的算法类似。
我的问题是我需要确保结果排名中项目的多样性。每个项目都属于一个类别。某些类别可能会特别受欢迎。我不希望首页(或第二页)中的所有项目都属于类别 A,而其他类别的项目却找不到。
那么,是否有任何聪明的算法可以确保结果的多样性——确保每个页面中不同类别的完美组合?
谢谢
I'm building a system similar to Reddit, where users "like" items. "Likes" would be used to determine ranking of items. There's also an "aging" factor, where more recent "likes" count more than ancient "likes".
All in all, it's similar to the algorithm described here.
My problem is that I need to ensure diversity of the items in the result ranking. Each item belongs to a category. Certain categories may be disproportionately popular. I don't want to have all items in the front page (or 2nd page) to belong to Category A, while items from other categories are nowhere to be found.
So are there any clever algorithm that can ensure diversity of results here -- to make sure there's a nice mix of different categories in every page?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于每个类别,创建该类别中所有项目的排名。然后,当您生成 Feed 时,您可以选择以不同的方式组合各个排名。例如,您可以随机均匀地合并类别:对于 Feed 中的每个位置,随机选择一个类别,并从该类别中取出您尚未放入 Feed 中的排名最高的项目。
For each category, create a ranking of all the items in that category. Then, when you generate your feed, you can choose to combine the individual rankings in different ways. For example, you could merge the categories randomly and evenly: for each spot in the feed, pick a category randomly and take the highest-ranked item from that category that you haven't put into the feed already.