better weights

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

View file

@ -57,6 +57,9 @@ def tv2newsStrat(context : Context) -> Prediction:
avg_delta += d
avg_timestamp = avg_delta // len(delta_times) // 60
p = Prediction()
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')