3 ms·
I have a wallpaper app where you can see which wallpapers are popular. One problem in determining popularity is I continually add new wallpapers. If each down
by Ologn 10y ago
I have a wallpaper app where you can see which wallpapers are popular. One problem in determining popularity is I continually add new wallpapers. If each download has the same score, then a wallpaper from three years ago that people download once a week will be shown for some time before a newer wallpaper that people download every day. Also, as the wallpapers appearing high on the popular tab have a higher chance of being downloaded, it becomes a self-reinforcing loop, cementing the place of the old wallpapers.
My solution for this was exponential decay. Newer downloads get a higher score than older downloads. The older the download, the lower the score. Now I have a better chance of seeing what's popular no matter when it was added.
This is not the most complex practical problem in the world and the solution is straight out of Calc 2.