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

Specifying param priors is inconsistent #380

Open
jllanfranchi opened this issue Jun 30, 2017 · 1 comment
Open

Specifying param priors is inconsistent #380

jllanfranchi opened this issue Jun 30, 2017 · 1 comment

Comments

@jllanfranchi
Copy link
Contributor

If you want to reference a param in config file from a param in another file, e.g.:

p1 = 1
p1.prior = ${ref:val.prior}

this works for uniform but spline requires an additional p1.prior.data = ... spec and this does not work with a Gaussian prior (you have to reference the value itself).

I think the best fix to this (that would also make switching among priors easier esp. when referencing priors from other files) would be to make the entire prior spec into a single line. E.g.:

p1.prior = gaussian: std_dev = 0.5
p2.prior = unform
p3.prior = spline: data = resource/location
p4.prior = None

then in another file, section (or in the same section) you can refer to all priors in a consistent one-line way:

p_a.prior = ${p1.prior}
p_b.prior = ${p2.prior}
p_c.prior = ${p3.prior}
p_d.prior = ${p4.prior}

It seems relatively easy to parse such param strings out, the biggest difficulty will be converting configs to use this convention.

@LeanderFischer
Copy link
Collaborator

I don't think anyone is trying to reference priors from other files, but this seems to be a somewhat useful enhancement, so I'm keeping it open..

@thehrh thehrh removed this from the PISA 4.2 milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants