On documenting the methods of every distribution #6321
ricardoV94
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This issue of how/whether we should add extensive documentation to all the logp/ logcdf/ moment/ rng_fn functions of every distribution comes up now and then:, #5297, #4859, #5308 (comment), #6280
My take is that manually documenting of these methods has negative utility, since these docstrings are very verbose/repetitive and annoying to fix.
Also these methods are not user-facing, since it's not always intuitive how to transform the inputs into the form expected by them (e.g., call
at.as_tensor_variable(inp)
and transform them if needed). Most of our users are not expected to know how Aesara works, but without knowing that, trying to use/read/fix the implementations is not trivial. No reasonable amount of docstrings in thelogp
method is going to bridge that gap.At most we could add
logp(value: Variable, param: Variable) -> Variable
if that seems helpfulFor reference, scipy which is in a very similar position, does not seem too concerned with documenting their methods internally: https://github.com/scipy/scipy/blob/main/scipy/stats/_continuous_distns.py
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gamma.html
Beta Was this translation helpful? Give feedback.
All reactions