Tweaked some parameters, back to 134
This commit is contained in:
parent
94524f7330
commit
3697d9e1f0
1 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,7 @@ def install(connection):
|
|||
check_trending_values(connection)
|
||||
|
||||
if TRENDING_LOG:
|
||||
f = open("trending_ar.log", "w")
|
||||
f = open("trending_ar.log", "a")
|
||||
f.close()
|
||||
|
||||
# Stub
|
||||
|
@ -61,7 +61,6 @@ def check_trending_values(connection):
|
|||
print("done.")
|
||||
|
||||
|
||||
|
||||
def spike_height(trending_score, x, x_old, time_boost=1.0):
|
||||
"""
|
||||
Compute the size of a trending spike.
|
||||
|
@ -76,7 +75,8 @@ def spike_height(trending_score, x, x_old, time_boost=1.0):
|
|||
|
||||
# Softened change in amount counts more for minnows
|
||||
if delta > 0.0:
|
||||
multiplier = 1.0/math.sqrt(x + 1.0)
|
||||
if trending_score >= 0.0:
|
||||
multiplier = 0.1/((trending_score/time_boost + softened_change_in_amount) + 1.0)
|
||||
softened_change_in_amount *= multiplier
|
||||
else:
|
||||
softened_change_in_amount *= -1.0
|
||||
|
|
Loading…
Reference in a new issue