-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Better transformation for bounded distributions #3058
Conversation
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) |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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).
@aseyboldt also commented on lower and upper not being bounded which causes some sharp cliffs in the posterior. |
Not sure I understand what that means... |
@junpenglao Sorry, that was a comment on the original TruncatedNormal implementation. This PR is exactly what I thought was missing :-) |
close #3010
also some PEP8 clean ups
and better parameter name for truncated_normal