流行的算法 [英] Popularity algorithm

查看:143
本文介绍了流行的算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SO 18乔尔提到,将排名根据他们的年龄和普及项目的算法,它是基于重力。可能有人张贴此? C#是可爱的,但实际上任何语言(当然,我不能这样做LISP)就可以了。

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.

推荐答案

我的理解是,它是大约从另一个<一以下href="http://stackoverflow.com/questions/24066/what-formula-should-be-used-to-determine-hot-questions"相对=nofollow>杰夫阿特伍德交

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

这篇关于流行的算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆