Skip to content

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Feb 10, 2021

Small fix to Triangular dist logp and logcdf bounds.

Before this PR the following evaluations gave wrong results (all should evaluate to -inf):

pm.Triangular.dist(lower=0, upper=1, c=2.0).logp(1.9).eval()           
array(0.64185389)

pm.Triangular.dist(lower=0, upper=1, c=-0.5).logp(-0.3).eval()          
array(0.55004634)

pm.Triangular.dist(lower=1, upper=0, c=0.5).logp(0.7).eval()
array(inf)

pm.Triangular.dist(lower=1, upper=0, c=2).logcdf(2).eval()              
array(nan)

pm.Triangular.dist(lower=1, upper=0, c=0.5).logcdf(2).eval()            
array(0.)

Depending on what your PR does, here are a few things you might want to address in the description:

@michaelosthege michaelosthege added this to the vNext (3.11.1) milestone Feb 11, 2021
@michaelosthege michaelosthege merged commit 1d37d31 into pymc-devs:master Feb 12, 2021
@ricardoV94 ricardoV94 deleted the fix_uniform_bounds branch February 12, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants