|ahcoldpizza3 Aug 06||
has an upper limit been established yet? i’ve noticed that many excellent works by many people aren’t moving up at all because of the fact that other good but not excellent works have so many more votes because they’ve been on the site for so long.
yet at the same time, its still possible to catapult collaborations to top 20 just by having everyone who worked on it (say liek 10 people) all vote it +.
|flipflop3 Aug 06||
very well explained, and no doupt that it works. it also makes it nigh impossible to manipulate a mosaic to an undeserved high position.
Keep up the good work, U have a winner with is format
|rawc30 Aug 06||
Now this seems a very interesting use of Bayesian Theorem. I like the idea. I don’t know if its the most fair one but it certainly does not seem unfair to me..
Albeit it depends on being well-voted(voted by a lot of people) which is not always guarenteed, at this moment i cannot think of anything better.
|hasan23 Nov 06||
It is useful to describe exactly how to calculate the following variables, e.g SQL statements:
|joe3 Feb 07||
Very good explaination of weighted averages. But wonder about all the queries that would take place for a large number of object. For example i want to apply this logic to rate songs. But potentially there could be many thousands of songs. So every time a song is loaded, you’d run this calculation again monay thousands of other songs (everytime). What if votes where collected per song and then a cron could talley up the days events - run/reset the averages once or possible twice a day. You’d reduce the server load and queries by a large factor I image. Of course you’d give up instantaneous results. What is your take on this. Thanks
|joe4 Feb 07||
for hasan: here is query example, might need to be cleaned up a bit
// Bayesian Rating Calc
$theItem = $_GET[’id’];
// all items votes and ratings
$result = mysql_query(”SELECT AVG(item),AVG(vote) FROM itemvotes WHERE vote>’0′ GROUP BY item”) or die(mysql_error());
$row = mysql_fetch_row($result);
$avg_num_votes = $row;
$avg_rating = $row;
// this item votes and ratings
$result = mysql_query(”SELECT COUNT(item),AVG(vote) FROM itemvotes WHERE item=’$theItem’ AND vote>’0′”) or die(mysql_error());
$row2 = mysql_fetch_row($result);
$this_num_votes = $row2;
$this_rating = $row2;
if(!$row OR !$row2)
$br = “_”;
$br = number_format( ((($avg_num_votes * $avg_rating) + ($this_num_votes * $this_rating))/($avg_num_votes + $this_num_votes)), 1, ‘.’ );
} // end of if item selected
|MorningStar5 Feb 07||
Hi Joe, you’re quite right. Every single new rating, adding or deleting an item requires all rankings to be recalculated. For this reason, TheBroth just sets a flag if the ranking and rating values have to be recalculated, and recurring cronjob does the rating calculation every N seconds (if the “must_update” flag is set).
For other installations of Bayesian rating: Depending on the server load, capacity and amount of items to be ranked, this cronjob interval will require to be set accordingly to provide a good compromise between processing cost and data freshness.
|Tim26 Apr 07||
Joe - just wanted to let you know we implemented your algorithm on the kuler website with much success. We are using a mySql table to store avg ratings, total votes, and the Bayesian Ratings. Whenever a user’s rating is submitted or updated in a separate table, an aggregate record is inserted or updated in our Bayesian table. This process is handled via triggers in the database. We currently have almost 9000 items users can vote on, and we have not experienced any performance hits yet.