Skip to content

Correlated priors update

I've run into a use case where I need correlated priors, so I've revived this MR. I changed the CorrelatedUniform class so that both the width and the center of the distribution can depend on the other sampled variables instead of just the mean (this was a change that I specifically needed for my analysis). I also had to edit the prior check in the base_sampler since any time the sample method was called, it was done in a loop over keys instead of calling the method of the PriorSet, and you can't sample individual keys for a correlated set. I also made some changes to the rescale, prob, and ln_prob methods of the CorrelatedPriorDict since they didn't seem to be returning numerical values.

@moritz.huebner if you could take a look and see if this is sufficiently in the spirit of your original MR, that would be great. I also merged in version 0.5.6 so lots of the base code is pretty different. If it's easier for me to submit a MR directly into master let me know. For what it's worth, I'm able to successfully run the sampler with this version of the code 🙂

Merge request reports

Loading