9
$\begingroup$

I'm implementing a rating system to be used on my website, and I think the Bayesian average is the best way to go about it. Every item will be rated in six different categories by the users. I don't want items with only one high rating to shoot to the top though, which is why I want to implement a Bayesian system.

Here is the formula:

Bayesian Rating = ( (avg_num_votes * avg_rating) + (this_num_votes * this_rating) ) / (avg_num_votes + this_num_votes)

Because the items will be rated in 6 different categories, should I use the average of the sums of those categories as "this_rating" for the Bayesian system? For instance, take one item with two ratings (scale of 0-5):

Rating 1:
  Category A: 3
  Category B: 1
  Category C: 2
  Category D: 4
  Category E: 5
  Category F: 3
  Sum: 18

Rating 2:
  Category A: 2
  Category B: 3
  Category C: 3
  Category D: 5
  Category E: 0
  Category F: 1
  Sum: 14

Should "this_rating" be simply the average of the sums listed above? Is my thinking correct, or should a Bayesian system be implemented for each category as well (or is that overthinking it)?

$\endgroup$
2
  • 2
    $\begingroup$ Interesting question. Initially, I had some trouble understanding your pseudo-code, and then I read: thebroth.com/blog/118/bayesian-rating $\endgroup$ Commented Aug 19, 2010 at 10:57
  • $\begingroup$ Here's an updated link (hurray for the Wayback Machine!). $\endgroup$
    – D.W.
    Commented Jul 6, 2012 at 17:27

1 Answer 1

6
$\begingroup$

It depends on whether you want to wind up only with a cumulative rating of each object, or category-specific rating. Having a separate system in each category sounds more realistic, but your particular context might suggest otherwise. You could even do both a category-specific and overall rating!

$\endgroup$
2
  • 2
    $\begingroup$ I agree. Also, depending on the domain a weighted composite of categories might be a more appropriate index of an overall rating. $\endgroup$ Commented Aug 19, 2010 at 10:55
  • $\begingroup$ Thanks for the thoughts Aniko. I'll take a look at this in the next few days. $\endgroup$ Commented Aug 20, 2010 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.