We have a news feed, and we want to surface items to the user based on a number of criteria. Certain items will be surfaced because of factor A, another because of factor B, and yet another because of factor C. We can create individual heuristics for each factor, but we then need to combine these heuristics in such a way that it promotes the best content considering each factor while still giving a mix of content from each factor.

Our naive approach is to load the top n from each factor, take the first of each, and make those the first 3 of the feed. Then take the 2nd from each feed and make that the second 3, and so on and so forth. Ideally, we would have some algorithm for more intelligently ranking these feed items - our first thought was to simply sum the three heuristics and pull the top items using the resulting combined score, but there are no guarantees that the heuristics are evenly-scaled (or are evenly-scaled for that particular user), which could result in one factor dominating over the others in the feed. Is there some more intelligent way of ranking these news feed items (akin to what Facebook does in its pseudo-chronological news feed)?


Averaging over differently-scaled variables can be accomplished with the geometric mean. As you point out, the arithmetic mean of several variables (which is proportional to the sum) is dominated by the "large" variables. If you have one metric that scores in the range 1 to 10 and another that score from 1 to 1,000,000, the first one will be totally insignificant in calculating the total.

The geometric mean fixes this, such that a 50% increase in the first variable will result in the same change in mean as a 50% increase in the second variable, regardless of the scale of those variables. It is effectively performing averaging over the percentage change, rather than the absolute magnitude of the change. This is a simple but effective way to combine variables that are on different scales.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.