I am using MongoDB for this and the data that effects each item is VIEWS, REVIEWS, and LIKES.
How can I calculate by how many likes, views, and reviews an item is getting to test if they are trending or not?
You can create your own methods, but it's a editorial decisions. For example:
* Does comments move the post up, down, or not at all. Here in HN the idea is that too many comments is a sign of a flamewar, so one there are too many, it adds a penalty, but the mods may remove it.
* Is 1.6 the best exponent? A smaller number make popular post stay in the front page forever, a bigger value make recent bad post get too easy to the front page. Is 1.6 the best exponent? Nobody know. My guess is that it was chosen by experimentation until the got the result they like the best. And there is an alternative page https://news.ycombinator.com/best with another exponent (or something more strange).
* Number of views are ignored here, but it may be a good idea for other sites.
From the top of my head, comments should take the biggest weight, likes next and view the smallest one. Basically the more actions users have to perform, the better rank the post gets.
But don't forget that views probably can be excluded from the equation as it is related to the other two. So either you drop view, or just use view. However, closer analysis would be needed (e.g. factor analysis, or PCA) to figure out the relationship.
https://medium.com/jp-tech/how-are-popular-ranking-algorithm...