Skip to content

Better transformation for bounded distributions #3058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 27, 2018
Merged

Better transformation for bounded distributions #3058

merged 5 commits into from
Jun 27, 2018

Conversation

junpenglao
Copy link
Member

close #3010
also some PEP8 clean ups
and better parameter name for truncated_normal

Junpeng Lao added 2 commits June 26, 2018 13:15
close #3010
also some PEP8 clean ups
and better parameter name for truncated_normal
@@ -488,32 +499,33 @@ class TruncatedNormal(Continuous):
Mean.
sd : float
Standard deviation (sd > 0).
a : float (optional)
lower : float (optional)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that lower and upper are nicer names, but it is different from scipy.stats.truncnormal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already use mu and sd instead of loc and scale, so I guess two more doesnt hurt ¯\_(ツ)_/¯

Also, since we are calling sd instead of sigma, pretty sure we lose the moral high ground to criticize naming in other packages...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really fix the sd - sigma thing (my fault).

Junpeng Lao added 2 commits June 26, 2018 14:38
@twiecki
Copy link
Member

twiecki commented Jun 26, 2018

@aseyboldt also commented on lower and upper not being bounded which causes some sharp cliffs in the posterior.

@junpenglao
Copy link
Member Author

Not sure I understand what that means...

@junpenglao junpenglao merged commit ed8b1dd into pymc-devs:master Jun 27, 2018
@junpenglao junpenglao deleted the fix_pareto_transformation branch June 27, 2018 06:13
@aseyboldt
Copy link
Member

@junpenglao Sorry, that was a comment on the original TruncatedNormal implementation. This PR is exactly what I thought was missing :-)

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.

map estimate of Pareto falls outside support
4 participants