From ea044ec2daf8905177c596b6e2137173d50ec3d3 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 10 Feb 2018 10:06:37 -0600 Subject: [PATCH] Fix rank_videos --- src/helpers.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.cr b/src/helpers.cr index 27c49c6e..b260ec9b 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -195,7 +195,7 @@ def rank_videos(db, n) published = rs.read(Time) # Exponential decay, older videos tend to rank lower - temperature = wilson_score * Math.exp(-0.02*((Time.now - published).hours)) + temperature = wilson_score * Math.exp(-0.000005*((Time.now - published).total_minutes)) top << {temperature, id} end end