-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot plot prior on corner plot due to missing atribute nlive #370
Comments
Hi @Jammy2211, many thanks for the detailed reproducible example! The issue is arising because in order to use the .prior() function you need dead points from a nested sampling run. At the moment it looks like your samples would be better suited to a At minimum a nested sampling run should contain:
The best way to achieve this is to initialise with a logL and a logL_birth argument to NestedSamples, but if logL_birth is not recorded by your sampler, you can provide logL_birth=nlive. What nested sampling algorithm has produced your samples? |
The sampler was the nested sampler I can easily supply log likelihood values and |
You won't be able to get prior samples with To get this to work we would need to get nautilus output to talk to anesthetic, which would mean implementing a new |
@johannesulf do you have any input here? |
Sorry, I'm not very familiar with the method discussed here which, as far as I understand, is related to obtaining an estimate of the prior from a nested sampling run. However, I'd assume one can do that with nautilus by taking the posterior sample from the run and then adjusting the weights according to log_w -> log_w - log_l. That should convert the posterior sample into a prior sample. Does that make sense? Sorry, I haven't used anesthetic myself and may have misunderstood the objectives here. |
Describe the bug
If have adapted the following code from the Quickstart tutorial (https://anesthetic.readthedocs.io/en/latest/quickstart.html):
The code reads (note the prior statements are commented out):
Provided the prior statements are commented out, the code works and I get the expected posterior plot.
However, if I try to also plot the prior, I get the following error:
To Reproduce
Steps to reproduce the behaviour.
Expected behavior
Priors to appear in plot, as shown on readthedocs.
The text was updated successfully, but these errors were encountered: