pisa icon indicating copy to clipboard operation
pisa copied to clipboard

Specifying param priors is inconsistent

Open jllanfranchi opened this issue 7 years ago • 1 comments

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.

jllanfranchi avatar Jun 30 '17 13:06 jllanfranchi

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..

LeanderFischer avatar May 29 '24 08:05 LeanderFischer