开发者

Help with Ruby on Rails 5 points ranking algorithm

开发者 https://www.devze.com 2022-12-21 20:25 出处:网络
I\'m currently in the process of developing a digg-like Ruby on Rails application for my degree\'s Final Project and I\'m stuck in the 5 point ranking algorithm.

I'm currently in the process of developing a digg-like Ruby on Rails application for my degree's Final Project and I'm stuck in the 5 point ranking algorithm.

There are a couple of factors that need to be involved, here's a breakdown :

Users

  • They'll have a personal 5 points ranking per category with 5 being the best and 1 being worst (Think of it as a 5 star ranking), so i could perfectly have IE. A 2 star ranking on the History category and a 5 star ranking on the Technology category.

Stories

  • Each story will be classified with just 1 category, when the user posts the story, (and here's the one of the problems) it'll be given a "base ranking" based on the ranking of the user in that category. IE let's say i have a 5 star ranking in the technology category then if I post a story in it's be given a base ranking of 5 stars because i have a 5 star ranking in that category.

In the end, i have 3 rankings. The avg user ranking, the ranking of the user per category and the ranking of each story.

I've found this link : http://www.seomoz.org/blog/reddit-stumbleupon-delicious-a开发者_JAVA技巧nd-hacker-news-algorithms-exposed

It decomposes various ranking algorithms, the Reddit algorithm seems to adapt my needs, I believe that it's just a matter of replacing the X = D - U variable with a proper equation that avgs the 1-5 points that can be given.

What do you guys think?

Thank you, Josh


It seems to me from your question that you are over-concerned with the initial ranking. The massive public response (or the lack of it) will overweight any initial ranking pretty fast.

Also, you can see from the linked article that all the formulas are merely simple analytic approximations to whatever behavior the creators had in mind (or, more likely, had sketched as a rough graph on a piece of paper). Thus, my recommendation will be - think what do you want to happen to the ranking as the time passes and people cast their votes; do some sketches of this behavior; think of a function that does more-or-less what you want; play with the constants until satisfied with the result.

Sorry about being rather vague, but this is homework, after all, and you gave a fairly vague description yourself. You are always welcome with further questions.

0

精彩评论

暂无评论...
验证码 换一张
取 消