-
Notifications
You must be signed in to change notification settings - Fork 1
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
Provide programmatic access to param names and values #130
Comments
Do we have any particular standardization for how attributes of Distributions are named, relative to the Just thinking that for many (most?) distributions, then they keys in |
There is no such standard and I believe there cannot be. This is difficult because some distributions take multiple parameterizations (e.g. |
Ah, sorry, wasn't clear — I meant actually for the values themselves. For example, for the normal distribution, the So in theory in the example you gave above we could just loop over the This doesn't work for either |
I've been working in ways like this:
And then you can initialize it as
I rarely find myself accessing the parameters by name
|
@ragulpr pointed out a need for programmatic access to params.
Maybe we can implement this as a
.param_values
property that returns anOrderedDict
from names to current values. Note that.params
currently over-specifies possible parameters and does not serve this purpose.This is still subtle to use since some params are not tensors, e.g.
Multinomial
takes an intn
.The text was updated successfully, but these errors were encountered: