PHP/ SQL Add "decay" to votes

Issue #35 new
Karl Groves repo owner created an issue

Upvote score should reflect the age of the entry.

Ideally, we'd also be able to use the headers from the link itself rather than the datetime from when it was added to a11ybuzz

Comments (3)

  1. Karl Groves reporter

    It'd be good to have an idea of how much the age contributes to the decay and also have a way to have the decay relative to all the other entries' dates.

    Its important that highly-rated entries don't decay to the point that they're considered equal to younger items with crappy ratings.

    This can be handled with an intelligently crafted SQL clause.

  2. Karl Groves reporter

    Here's a sample query regarding how do overall (all-time) vote processing.

    SELECT widget_id, ((positive + 1.9208) / (positive + negative) - 1.96 * SQRT((positive * negative) / (positive + negative) + 0.9604) / (positive + negative)) / (1 + 3.8416 / (positive + negative)) AS ci_lower_bound FROM widgets WHERE positive + negative > 0 ORDER BY ci_lower_bound DESC;

    This does not take into consideration "decay", but it seems like the decay could be calculated based on # of days old the entry is

  3. Log in to comment