... Suggestion from a Showcase Early Adopter (EA) license holder made at my private development site.
In a nut shell, I am switching from sorting by the Rating Average to sorting by Rating Weighted.
ProWeb said:Right now the default sort order is by "views". We did this when we converted to the XF because it was the closest proxy we had for the "nicest" coop pages.
Ideally we'd like to move to a sort by "ratings"... In theory this would be BEST... but the problem is that a page with one 5 star review (let's say a friend gave it to someone's crappy page) will rank higher than a page with dozens of 4.9 reviews.
Is there any way to weight "sort by ratings" such that the number of ratings is taken into account?
How does Resource Manager do it? When I sort by "ratings" here, it looks like it's taking into account the number of reviews AND the average review, no?
When I sort by "rating", we get all the 5-star reviews first... even if it's just one review:
Chicken Coops | BackYard Chickens
Thanks!
In a nut shell, I am switching from sorting by the Rating Average to sorting by Rating Weighted.
Its based on this : Bayesian average - WikipediaProWeb said:(BTW, the geek in me is curious how weighting is calculated... is it just something simple like "average rating" multiplied=by "# reviews"?)
PHP:
// same as the xf resource manager to maintain a standard.
public static $voteThreshold = 10;
public static $averageVote = 3;
public function getWeightedRating($count, $sum)
{
return (self::$voteThreshold * self::$averageVote + $sum) / (self::$voteThreshold + $count);
}
Upvote
0