better weights
This commit is contained in:
parent
7ba556bc29
commit
670395c672
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue