A neat little trick with time decay

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

A technique for computing time-decayed popularity scores without storing timestamps. Instead of tracking when each score was calculated, you factor out the current time as a constant multiplier and store only the time-independent component. Because the raw accumulated value grows astronomically large, you store its logarithm instead. Adding new terms to a log-space sum is handled via a numerically stable log-sum-exp identity, avoiding overflow. This approach was used at Spotify for track popularity scoring.

2m read timeFrom erikbern.com
Post cover image

Sort: