1 view

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)?

by (33.1k points)

You can solve this problem, if your final combined heuristic does not need to be admissible, you can use the sum of the original heuristics as your final heuristic. The problem here is that the original heuristics are probably not of the same dimension, for instance, A has values ranging from 0 to 100 and B has values from -1 to +1. I suggest using the following formula to calculate the combined heuristic for an item, that ignores the dimensions of the particular heuristics:

H = (A - min(A))/(max(A) - min(A)) + (B - min(B))/(max(B) -

min(B)) + (C - min(C))/(max(C) - min(C))