Open JohannesBuchner opened 4 years ago
How does DNest4 know the width of the prior distribution? I want to use a uniform prior from -1 to 1. I don't seem to provide that anywhere. Can I modify the DNest4 parameters so it behaves better, without making it overly problem-dependent?
OK, I made some progress. I realised that I need to draw from the entire prior, because the prior to posterior shrinkage is constrained by how particles go up in levels. I also needed to modify the perturb function to cover more orders of magnitudes, with:
def randh():
a = np.random.randn()
b = np.random.rand()
t = a/np.sqrt(-np.log(b))
n = np.random.randn()
return 10.0**(1.5 - 15*np.abs(t))*n
I also had to increase to using 100 levels.
Are you happy with it now? Your proposal covers a very wide range of scales. These days I use a log cauchy for that. Also you might try letting it choose the number of levels itself but if there's a phase change that might work as well.
On Tue, 30 Jun 2020, 8:46 AM Johannes Buchner, notifications@github.com wrote:
I also had to increase to using 100 levels.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eggplantbren/DNest4/issues/34#issuecomment-651354751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMBKOTTFDTFNB6E4TAHU3TRZD4TJANCNFSM4OLMCLAA .
Hi,
I wanted to show a small demo of Diffusive Nested Sampling in comparison to other techniques. I set up two gaussian shells which work as a spike-slab model in 2d. The posterior looks like a diamond ring (the second peak/shell is the knot on the left):
I thought this problem is nice because it tries to mimic some problems of high-d -- MCMC auto-correlation is rather poor, it has heavy tails, etc. I set up DNest4 code, and it runs, but it converges extremely slowly towards the true lnZ (-22.93).
Output:
My questions are:
Code: