JohannesBuchner / UltraNest

Fit and compare complex models reliably and rapidly. Advanced nested sampling.
https://johannesbuchner.github.io/UltraNest/
Other
153 stars 30 forks source link

How to sample initial points from a Gaussian around a fiducial value instead of uniformly from the prior? #151

Closed DanielaBreitman closed 1 month ago

DanielaBreitman commented 1 month ago

Description

The reactive nested sampler starts the inference by uniformly sampling points from the prior. But what if I have a fiducial value / guess to help the inference start in a "better" place? I don't want to change the prior, only how the first parameters are sampled when the inference begins. Is there maybe something like this already implemented and I'm just unable to find it?

Thanks

JohannesBuchner commented 1 month ago

You can use warm starting to reweight and deform the parameter space. https://johannesbuchner.github.io/UltraNest/example-warmstart.html

DanielaBreitman commented 1 month ago

Thank you so much!

DanielaBreitman commented 1 month ago

Oh actually one more question: is it possible to warm start from an incomplete run? The warm starting tutorial uses the u points from the chains folder, but in my case, the run did not complete, so the only data I have is results/points.hdf5. Is it possible to use those points somehow? Thanks again.

JohannesBuchner commented 1 month ago

You could resume that run?

You could also have a look at that hdf5 file, with https://johannesbuchner.github.io/UltraNest/ultranest.html#ultranest.integrator.read_file and get the distribution of the last few hundred points to have an idea in which subregion it was converging to.

DanielaBreitman commented 1 month ago

The likelihood is different so resuming would not work. Thank you for the reply!