Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Popularity algorithm

Tags:

c#

algorithm

math

On SO 18 Joel mentioned an algorithm that would rank items based on their age and popularity and it's based on gravity. Could someone post this? C# would be lovely, but really any language (well, I can't do LISP) would be fine.

like image 812
kemiller2002 Avatar asked Aug 28 '08 14:08

kemiller2002


People also ask

How do you calculate popularity?

How is it calculated? As mentioned above, the popularity is based on view counts. In the formula, mostViewInCollection is simply the number of views on the most popular article in the Collection. If you have an article with 100 views, making it the most popular, it would have a popularity rating of 5.0.

How does Reddit ranking algorithm work?

Reddit ranks an item by calculating the number of votes a link has and then subtracting points based on how old that link is. This means that newer links generally rank higher than older links.


2 Answers

My understanding is that it is approximately the following from another Jeff Atwood post

t = (time of entry post) - (Dec 8, 2005)
x = upvotes - downvotes

y = {1 if x > 0, 0 if x = 0, -1 if x < 0)
z = {1 if x < 1, otherwise x}

log(z) + (y * t)/45000
like image 189
Tall Jeff Avatar answered Oct 05 '22 12:10

Tall Jeff


alt text http://www.mt-soft.com.ar/wordpress/wp-content/plugins/wp-o-matic/cache/0ad4d_reddit_cf_algorithm.png

like image 23
Abhishek Mishra Avatar answered Oct 05 '22 12:10

Abhishek Mishra