Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sort entities by 5 star user rating

Tags:

math

I am trying to find a formula

http://www.evanmiller.org/how-not-to-sort-by-average-rating.html

The one from the above link is too hard to implement. Is there a nicer and simpler way to sort entities by a five star user rating control ?

Think at jokes. People say jokes and others rate them with 1 to 5 stars.
If
a) 5 users rate a joke with 5,
b) another 1000 rate another joke with 4 and finally,
c) another 1000 rate another joke with 3.8,
I want this specific order:

  • joke b)
  • joke c)
  • joke a)
like image 644
Sorin Avatar asked Oct 14 '22 09:10

Sorin


1 Answers

I use a Bayesian Rating system and it's quite simple:

http://www.thebroth.com/blog/118/bayesian-rating

like image 178
Keith Adler Avatar answered Oct 18 '22 08:10

Keith Adler