better weights

This commit is contained in:
Milo 2019-04-06 17:47:33 +02:00
parent 7ba556bc29
commit 670395c672

View file

@ -57,7 +57,10 @@ def tv2newsStrat(context : Context) -> Prediction:
avg_delta += d
avg_timestamp = avg_delta // len(delta_times) // 60
p = Prediction()
p.weight = 0.7
if avg_timestamp < 0:
p.weight = 0.0
else:
p.weight = 0.7
p.probability = 1.0 if avg_timestamp > 50 else 0.0
p.reasons.append('There were ' + ('few' if avg_timestamp > 50 else 'many') + ' recent articles on TV2 News')
return p