Closed lboogaard closed 1 year ago
That's fine and how the equally weighted posterior samples are created internally (in all nested samplers).
If you need the likelihood of the posterior samples, I suspect you are doing something dodgy though ... What do you need it for?
Mostly bookkeeping actually: I'm optimizing a larger model for which I recompute the full output on the equally weighted posterior samples (to speed-up during optimization, I only compute the subset of the output relevant for comparing to the actual observables we have).
I'm now curious what the outputs actually look like for the samples that produced highest likelihood. Hence it seems useful to still have the likelihoods associated with the samples.
Yeah, considering the likelihood isn't really a Bayesian approach because it doesn't consider the prior density, I'd usually just grab the first hundred or so posterior points to work with (e.g., plot the model fit). In many cases both approaches end up behaving similarly though.
Yes, of course - thanks for the clarifications!
Thanks a lot for Ultranest. I am interested in the likelihood of the points in the final set of samples. I noticed the
logl
associated with each sample is not saved inequal_weighted_post.txt
, is there a reason for this? Currently I just recallutils.resample_equal
on the samples including thelogl
values fromweighted_post.txt
to recreate them - is there anything against this?