-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Rename sd to sigma for consistency. #3309
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
Conversation
_, sd = get_tau_sd(tau=kwargs.pop('tau', None), | ||
sd=kwargs.pop('sd', None)) | ||
if 'sd' in kwargs.keys(): | ||
kwargs['sigma'] = kwargs.pop('sd') |
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.
should it warn about deprecation?
|
||
|
||
def rho2sd(rho): | ||
def rho2sigma(rho): |
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.
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.
Also a backward compat function warning about deprecation is needed
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.
+1 We should have rho2d = rho2sigma
When should we drop support for old convention?
|
I'm not sure we should ever drop support, but high uncertainty on what the best course of action is. If we strongly feel that this renaming is the right way forward, we should raise a deprecation warning in the next release and drop it after. |
I agree that adopting Greek as a package-wide convention is a good idea. I don't think there's any harm in allowing |
2308a9b
to
7cd7cb0
Compare
Docs are updated and made a comment in the release notes. |
5f4aede
to
53e1ce2
Compare
1b74f74
to
cc9f4ef
Compare
A long time ago I made the terrible choice of naming the scale parameter of the Normal distribution
sd
instead ofsigma
. This is a terrible choice because all our other parameter names follow greek names, so it should either bemean
andsd
, ormu
andsigma
. Since we're using greek everywhere else it should be the same forsd
, I meansigma
...This was also rightfully criticized by @bob-carpenter in his blog post https://andrewgelman.com/2017/05/31/compare-stan-pymc3-edward-hello-world/

This so far replaces sd->sigma everywhere in the
continuous.py
but also allows passingsd
to keep backwards compatibility. I don't think we should really deprecate this because everyone is using it but allow for a more consistent naming to emerge.If we decide to go ahead we should probably also fix this in the docs, so I marked this as WIP.