开发者

Balanced mix of recent, interesting and new/unanswered posts

开发者 https://www.devze.com 2023-04-04 12:33 出处:网络
I\'m searching algorithm, or some fitness rating method. As an example take Stackoverflow. Posts are divided to groups by

I'm searching algorithm, or some fitness rating method.

As an example take Stackoverflow. Posts are divided to groups by

  • Rating (+,-,0)
  • Tags (and tags impo开发者_JAVA技巧rtance based on activity in them)
  • Users (user rating/reputation, age, recent activity)
  • Keywords

And I'm looking for way, how to sort them to create optimized/balanced mix.

I don't want to show ONLY the newest OR ONLY the top rated OR ONLY important tags

maybe the name would be "Multiple-attributes optimal sorting", or something similar.

Anyone can advise something? Thanks

ADD1: maybe we are talking about Fitness function ( http://en.wikipedia.org/wiki/Fitness_function )


Generate separate sub-scores for each of those factors, then normalize them, add them together, and sort by the resulting total for each post. For instance,

  1. Rank all of the posts by rating, and then map their position in the ranking to a 0.0-1.0 range (highest rated post is 1.0, lowest is 0.0).
  2. Create a function to take a post's tags and calculate a similar 0.0-1.0 score based on tags only.
  3. Create another function to do the same for the user.
  4. And another for any keywords you want.

If you want certain things to factor in more than others, multiply the subscore by a constant factor before adding it to the total - for instance, if you want rating to be important, and the others less so, you might do (3*A)+B+C+D if the four subscores are the letters.

As for exactly how you translate things into subscores? That's something you really have to determine for your particular app; there's no single way of doing it that is "right".

0

精彩评论

暂无评论...
验证码 换一张
取 消