4 ms·
Ask HN: Algorithm for ranking comments in a post
I like the way HN displays comments based on how recent it is and its upvotes. I am building a leaderboard that ranks people and looking for a similar algorithm. Can you explain the algorithm?
- manidoraisamy 12y agoHere is my current algorithm: DiffInDays = Today - Date_1970_1_1; // Number of days between Today and Jan 1, 1970. Rank = DiffInDays + (Score/1000); // Score is the equivalent of upvotes. // Sort by Rank
- avargas 12y agoYou could create something based off reddit's http://amix.dk/blog/post/19588 http://amix.dk/blog/post/19588
- lugg 12y agohttps://news.ycombinator.com/item?id=1781013 https://news.ycombinator.com/item?id=1781013 http://amix.dk/blog/post/19574 http://amix.dk/blog/post/19574
- biomimic 12y agoYou can also use Statistical NLP to rank comments with unique and important words. Biomimic@gmail.com for details.
- ohashi 12y agoThe other post mentions wilson confidence interval's. Here's the post I learned it from: http://www.evanmiller.org/how-not-to-sort-by-average-rating.html http://www.evanmiller.org/how-not-to-sort-by-average-rating....
- manidoraisamy 12y agoThanks! Did I get these right? - HN uses time decay to reduce score of older comments. While, Reddit uses wilson confidence interval to give provisional ranking for comments. - Wilson confidence interval is useful when you want prospective score i.e. if comments are likely to get more upvotes in the future. - For definitive score, (lets say, user played a game and has a score), HN's time decay will work better than wilson confidence interval?