JohannesBuchner / PyMultiNest

Pythonic Bayesian inference and visualization for the MultiNest Nested Sampling Algorithm and PyCuba's cubature algorithms.
http://johannesbuchner.github.io/PyMultiNest/
Other
194 stars 88 forks source link

Smoothing out multiple modes #200

Closed nsusemiehl closed 2 years ago

nsusemiehl commented 2 years ago

The posteriors produced following retrievals I ran using PyMultiNest exhibit multiple distinct modes (example image attached). I have confirmed that these are real, but I'm interested in smoothing the posterior distributions out so they appear more uniform over the range which includes the spikes. There are several parameters of PyMultiNest's "run" function which seem helpful for this, but changing "multimodal" to False, increasing "mode_tolerance", and/or decreasing the "max_modes" did not seem to change the posterior distribution at all. It's very possible that I misunderstood the purpose of these parameters, but I expected them to result in a posterior with fewer apparent modes. Essentially, I want to prevent the sampler from being stuck in these regions of the parameter space that exhibit the spikes. How can this be accomplished?

Thanks in advance.

g_posterior

JohannesBuchner commented 2 years ago

The parameters you mention are related to the clustering of MultiNest, which has to do with the efficiency of the exploration.

What is causing the spikes? Presumably the likelihood is unstable?

For visualisation purposes, there are KDE techniques you could use, but it is probably best to fix the underlying issue in the model.