Skip to content

Create method for CLVModel to attach str_for_dist to parameters #97

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

Closed
larryshamalama opened this issue Nov 30, 2022 · 0 comments · Fixed by #133
Closed

Create method for CLVModel to attach str_for_dist to parameters #97

larryshamalama opened this issue Nov 30, 2022 · 0 comments · Fixed by #133

Comments

@larryshamalama
Copy link
Contributor

larryshamalama commented Nov 30, 2022

Priors are initialized via the .dist() API and are manually attached in the _process_priors method.

# Who had the idea of attaching methods to pre-existing objects?
p_prior.str_repr = types.MethodType(str_for_dist, p_prior)
q_prior.str_repr = types.MethodType(str_for_dist, q_prior)
v_prior.str_repr = types.MethodType(str_for_dist, v_prior)

This is currently true for the Gamma-Gamma models and BetaGeoModel in #67. A helper method in CLVModel could do the trick. An even better solution would be to address issue 6311 in PyMC.

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