Add MCMC combine method and improve shuffle behaviour when combining results
Cherry picked results from !945 (merged)
Note: this will change the default behaviour when combining both MCMC and nested samples. Instead of shuffling the results together, they will be unshuffled enabling converge checks of the individual chains.
- Add option to shuffle posteriors when combining (default to false)
- Add mcmc sample combine
Merge request reports
Activity
changed milestone to %1.1.2
To clarify the change, here are some plots.
Current behaviour
If you run
pesummary
(or just plot theposterior
chain) for a singledynesty
run. You will get a plot which shows the evolution of samples as the sampler climbs the likelihood surface:But, if you plot the samples from multiple combined samples from
dynesty
and the current master you will get something that looks like this:The samples get shuffled and you lose the structure.
Proposed behaviour
With this MR, you will get the same plot if you run a single sampler. But, if you merge multiple samplers runs together you'll get:
This is an improvement because: a) The current behaviour is inconsistent between single and multi-chain runs leading to user confusion b) Seeing the individual chains enables an assessment of convergence and the identification of "bad chains". c) Downstream users may still shuffle their posteriors if they want to remove the structure.
added 3 commits
-
086ffce4...fef914d0 - 2 commits from branch
master
- 27fa1e48 - Merge branch 'master' into result-improvement
-
086ffce4...fef914d0 - 2 commits from branch
added Sampling label
mentioned in commit fea22763