显示评分最高的商品的逻辑是什么?
我想在我的网站中显示按评级排序的项目。 我不想按平均评分显示评分最高的项目。谁能建议一些公式来定义评分最高的项目。
I want to show items in my website sorted by its rating.
I don't want to show highest rated items by the average of rating. Could anyone suggest some formula to define highest rated item.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以根据已输入评级的人数来衡量每个项目的平均评级。这将确保具有高评分数量和高平均评分的项目将浮到顶部,而不仅仅是具有单一评分的项目。
此外,您可以考虑对其进行标准化,这样它只会在应用的 1 和 100 评级之间产生差异。
这样,即使平均评分较低,对某个项目的投票也不会始终名列前茅。
除此之外,我认为您需要提供更多信息,说明您希望表明某个项目是顶级项目的依据。对它的总浏览量,将其标记为最受欢迎,也可能是一种选择。
You could weight each item's average rating by the number of people who have entered in a rating. This would ensure items with both high number of rating and high average rating would float to the top instead of just items with a singular rating.
Additionally, you could consider normalizing this so it only makes a difference between say 1 and 100 rating applied.
This way run away votes on an item, even with a low average rating, wouldn't end up on the top all the time.
Outside of that, I think you'll need to provide more information on what basis you'd like to indicate an item is a top item. Total views on it, marking it as most popular, could be an option as well.
您对项目分数的定义可能是以下函数:
Your definition of the score for an item is likely to be a function of: