bd-j / prospector

Python code for Stellar Population Inference from Spectra and SEDs
http://prospect.readthedocs.io
MIT License
155 stars 71 forks source link

nautilus support #265

Closed johannesulf closed 1 week ago

johannesulf commented 1 year ago

I'm developing a new Bayesian sampler called nautilus. It's based on combining importance nested sampling with deep learning. This new sampler has been verified to give accurate results on various problems, including galaxy SED fitting (using bagpipes because it's fast). For this application based on bagpipes example 4, I tested nautilus against dynesty with random walk and slice sampling as well as other samplers. In addition to producing very accurate results, nautilus is very fast and efficient, i.e., producing many effective samples for a given number of model evaluations. Nautilus needs roughly five times fewer likelihood calls than dynesty (both samplers run in their default configuration), while producing a larger effective sample size and a much more precise evidence estimate.

nautilus dynesty-rwalk dynesty-slice
likelihood calls ~75,000 ~400,000 ~2,000,000
effective sample size ~14,000 ~12,000 ~11,000
log evidence uncertainty ~0.01 ~0.36 ~0.26

Nautilus is well-documented and tested. It's available on PyPI and conda. It has few dependencies (numpy, scipy, sklearn, threadpoolctl and tqdm) and is pure Python. A paper will be on arXiv soon and nautilus' interface is very similar to that of dynesty. I think a nautilus interface could be a nice addition to prospector and I'd be happy to help implement it.

bd-j commented 1 year ago

Hi Johannes, thanks for bringing this up and for the offer to help implement nautilus! I'd be happy to try this soon. One small complication is that I'm currently working on a new version 2.0 of prospector that changes some of the likelihood internals, and it might make sense to add nautilus in that version once it has stabilized a bit (should be soon)

bd-j commented 1 week ago

closed by #338