You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In plot_posterior, when checking the fixed parameter, only axis 0 has :, so axes 1 and 2 both get filtered by the index_sel mask. This results in each fitted parameter having only 4 steps per walker in the corner plot (the shape before the index selection is (nwalkers, nsteps-burnin, nparams) and it goes to (nwalkers, nparams, nparams) after). I fixed this in a fork of the project and I can create a PR (the only modification is shown in the code block below). I checked with a few numpy versions and it does not seem related to a numpy version problem.
# Check if parameter values were fixed
index_sel = []
index_del = []
# Use only last axis for parameter dimensions
for i in range(ndim):
if np.amin(samples[:, :, i]) == np.amax(samples[:, :, i]):
index_del.append(i)
else:
index_sel.append(i)
samples = samples[:, :, index_sel]
The text was updated successfully, but these errors were encountered:
Right, this is something that I had implemented recently. The problem is that the ndim of the stored samples from run_mcmc is 3, while the ndim from run_multinest is 2. In the latter case the shape if (nsamples, nparams).
It would be great if you could create a PR which solves this issues and takes the two ndim cases into account.
By the way, when using FitModel, the run_multinest function has more features compared to run_mcmc and convergences more easily in case the posterior is multimodal. It also returns the evidence which can be used for model comparison.
In
plot_posterior
, when checking the fixed parameter, only axis 0 has:
, so axes 1 and 2 both get filtered by theindex_sel
mask. This results in each fitted parameter having only 4 steps per walker in the corner plot (the shape before the index selection is(nwalkers, nsteps-burnin, nparams)
and it goes to(nwalkers, nparams, nparams)
after). I fixed this in a fork of the project and I can create a PR (the only modification is shown in the code block below). I checked with a fewnumpy
versions and it does not seem related to anumpy
version problem.The text was updated successfully, but these errors were encountered: