BEAST2-Dev / nested-sampling

Nested sampling packagin for BEAST
GNU Lesser General Public License v2.1
11 stars 1 forks source link

Operators optimisation during nested sampling #13

Open MordorianGuy opened 2 years ago

MordorianGuy commented 2 years ago

The converter from MCMC to NS turns operators autooptimisation off. I have looked at this in the schedule code but have not understood the reason. Are there any recommendations about scale factors & weights setting for NS analysis? It would be really appreciated if you could shed light on this question.

rbouckaert commented 2 years ago

Auto optimisation is turned off because otherwise operators would be tuned to the prior distribution, which is probably not appropriate for later MCMC samples when the sampling distribution shifts.

Operator weights should be set based on mixing of the parameters that the operators apply to: if you see high ESSs of say the frequency parameter for a substitution model compared to the posterior, the weight can be lowered on the DeltaExchangeOperator applied to the frequency parameter. If the tree prior, tree height or tree length has low ESS this is usually a sign that tree operators do not have enough weight. However, be aware parameters (like relaxed clock rates and tree) may interact with each other, so reweighing one operator can result in changes in mixing of others: low tree prior ESS may be the result of low clock model parameter operator weights.

I suppose operator parameters (like scale factors) can only be determined by trial and error and looking at operator acceptance probabilities (they are printed at the end of a run, but can also be seen in the last part of the state file). High acceptance is usually associated with small steps in the state space, while low acceptance with large steps. For MCMC, many operators have optimal acceptance probability of 0.234 (a bit higher for Bactrian operators), where size of the step is balanced with the probability it is accepted resulting in optimal ESSs.