ICSM / ampere

A tool to fit the SED and spectra of dusty objects to constrain, among other things, the dust properties and mineralogy
6 stars 2 forks source link

Search algorithms: Nested Sampling with Dynesty #38

Closed pscicluna closed 2 years ago

pscicluna commented 3 years ago

As mentioned in issue 14, we need to add more search algorithms, and each one will have its own issue to track progress. This issue will track progress implementing nested sampling with Dynesty. This will start with 'static' nested sampling, and then progress to dynamic nested sampling.

Progress that has been made previously is mentioned in the overall thread:

I started working on adding (dynamic) nested sampling using dynesty. A class has been added that should work for static nested sampling, the class for dynamic nested sampling should be able to inherit everything except the constructor from the static nested sampling class.

An important thing to bear in mind is that nested sampling and MCMC use the priors in different ways, so we need two different methods in each model/data class: one (as now) that computes the natural log of the prior probability of a given set of parameter values, used by MCMC-type methods (self.lnprior) ; and one that computes the transformation from random numbers uniformly distributed in the interval [0,1) to random numbers uniformly distributed in the prior volume, known as the prior transform (self.prior_transform). This means we need to add an extra method to every existing model/data class to accommodate this.

Next step for this is to figure out a few tests for static nested sampling.

pscicluna commented 3 years ago

Some basics are now implemented in a new branch. Testing and bugfixes are required, but it appears to be working so far. For obvious reasons, nested sampling is very sensitive to the prior, so users should test different priors if they encounter strange behaviour or signs of instability.

pscicluna commented 2 years ago

This was completed in 45c5f6377f36b0a95623c32be08e585719d033e9.