Skip to content
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

implement params_dict method or attribute #518

Closed
aloctavodia opened this issue Aug 14, 2024 · 0 comments · Fixed by #521
Closed

implement params_dict method or attribute #518

aloctavodia opened this issue Aug 14, 2024 · 0 comments · Fixed by #521

Comments

@aloctavodia
Copy link
Contributor

Currently, if we have a distribution and want to find out its parameters programmatically we can do:

  • dist.params, a tuple with the values
  • dist.param_names a tuple with the names

For distributions with more than one parameterization, these two functions will return the values and names of the default/canonical parameterization. Additionally, we can obtain the values of the parameters by name, even non-canonical names, for example, this works pz.Normal(mu=0, sigma=0.5).tau .

I think we should have a params_dict attribute or method that returns a dictionary with names:values. Not sure which one is better

For distributions with more than one parameterization, what should we return?

  • attribute. Just the canonical dict, a tuple of dicts with all parameterizations?
  • method we can pass an argument to ask for different parameterizations like "canonical" vs "alternative". For distributions with more than 2 parametrization we need some other keyword... not sure what would be a nice choice.
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 a pull request may close this issue.

1 participant