显示评分最高的商品的逻辑是什么?

发布于 11-07 13:59 字数 65 浏览 7 评论 0原文

我想在我的网站中显示按评级排序的项目。 我不想按平均评分显示评分最高的项目。谁能建议一些公式来定义评分最高的项目。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱给你人给你2024-11-14 13:59:47

您可以根据已输入评级的人数来衡量每个项目的平均评级。这将确保具有高评分数量和高平均评分的项目将浮到顶部,而不仅仅是具有单一评分的项目。

projectedRating = item.AverageRating * item.Ratings.Count

此外,您可以考虑对其进行标准化,这样它只会在应用的 1 和 100 评级之间产生差异。

projectedRating = item.AverageRating * Max(item.Ratings.Count, 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.

projectedRating = item.AverageRating * item.Ratings.Count

Additionally, you could consider normalizing this so it only makes a difference between say 1 and 100 rating applied.

projectedRating = item.AverageRating * Max(item.Ratings.Count, 100)

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.

薔薇婲2024-11-14 13:59:47

您对项目分数的定义可能是以下函数:

  • 平均评分
  • 最高评分、最低评分
  • 评分数
  • 时间加权

Your definition of the score for an item is likely to be a function of:

  • Average rating
  • Highest rating, lowest rating
  • Number of rates
  • A time weighting
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文