forked from enviPath/enviPy
[Fix] Pepper display probability calculation (#349)
Probability of persistent is now calculated to include very persistent. Reviewed-on: enviPath/enviPy#349 Co-authored-by: Liam Brydon <lbry121@aucklanduni.ac.nz> Co-committed-by: Liam Brydon <lbry121@aucklanduni.ac.nz>
This commit is contained in:
@ -79,9 +79,9 @@ class PepperPrediction(PredictedProperty):
|
||||
dist = stats.lognorm(s=sigma_ln, scale=np.exp(mu_ln))
|
||||
|
||||
# Exact probabilities
|
||||
p_green = dist.cdf(p) # P(X < a)
|
||||
p_yellow = dist.cdf(vp) - p_green # P(a <= X <= b)
|
||||
p_red = 1.0 - dist.cdf(vp) # P(X > b)
|
||||
p_green = dist.cdf(p) # P(X < p) prob not persistent
|
||||
p_yellow = 1.0 - dist.cdf(p) # P (X > p) prob persistent
|
||||
p_red = 1.0 - dist.cdf(vp) # P(X > vp) prob very persistent
|
||||
|
||||
# Plotting range
|
||||
q_low, q_high = dist.ppf(quantiles)
|
||||
|
||||
Reference in New Issue
Block a user