-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update pymc.TruncatedNormal docstring #5546
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
Changes from 1 commit
df1850c
4f6fff4
4a12878
c972983
016b88e
d36d34c
fbf1190
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -673,14 +673,14 @@ class TruncatedNormal(BoundedContinuous): | |||||
|
||||||
Parameters | ||||||
---------- | ||||||
mu: float | ||||||
mu : tensor_like of float, optional | ||||||
Mean. | ||||||
sigma: float | ||||||
sigma : tensor_like of float, optional | ||||||
Standard deviation (sigma > 0). | ||||||
lower: float (optional) | ||||||
Left bound. | ||||||
upper: float (optional) | ||||||
Right bound. | ||||||
lower : tensor_like of float, optional | ||||||
Left bound. Defaults to 0. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the defaults are wrong (same for upper). I'd bet the default is no bound or infinity or somehting of the sort There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am unable to find out the default value for mu and sigma. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First check the description in the docstring, sometimes the defaults are incorrectly explained in the extended summary section. If they are not you should read the mupymc/pymc/distributions/continuous.py Line 720 in 4223b6e
it is defined straight away here, so it seems like it is not optional actually. @ricardoV94 is this intended? If the value in the function call were 0 instead of None then you would use the lowerpymc/pymc/distributions/continuous.py Line 724 in 4223b6e
the default in the function call is None, and when it is None, what is actually used is - infinity. When a value is given, that value is used. So lower should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the default of mu should indeed be zero, not None There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. transform as a positional argument is outdated an should be removed from the |
||||||
upper : tensor_like of float, optional | ||||||
Right bound. Defaults to 1. | ||||||
|
||||||
Examples | ||||||
-------- | ||||||
|
@@ -762,9 +762,9 @@ def logp( | |||||
|
||||||
Parameters | ||||||
---------- | ||||||
value: numeric | ||||||
value : tensor_like of float | ||||||
Value(s) for which log-probability is calculated. If the log probabilities for multiple | ||||||
values are desired the values must be provided in a numpy array or Aesara tensor | ||||||
values are desired the values must be provided in a numpy array or Aesara tensor. | ||||||
|
||||||
Returns | ||||||
------- | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.