cmbant/getdist

triangle plot visualisation

Closed this issue · 6 comments

Hi all,

I have an issue with the "triangle_plot" where as can be seen from the attached figure for some parameters (e.g. \gamma) the 1d plot (green) do not seem to display the marginalised distribution that I would expect from looking at the corresponding 2d plot. Is this a smoothing issue?

getdist_issue

Certainly looks odd. Please can you attach data and code to reproduce?

Dear Antony,

You will find the data and code to reproduce the plot above at https://github.com/Sketos/github_issues/tree/master/getdist/%2357

The samples were generate using pymultinest (https://github.com/JohannesBuchner/PyMultiNest) and they have weights associated with them. I am using getdist version 1.1.0. Let me know if you need more information.

Thanks, that's helpful.

The issue seems to be that the MCSamples instances in your pickle have the "sampler" property is set to "mcmc" not "nested". Polychord chains output by Cobaya should have this propagated automatically, but otherwise you may need to set the property manually when creating the MCsamples object, see
https://getdist.readthedocs.io/en/latest/mcsamples.html#getdist.mcsamples.MCSamples

In your script, adding samples.sampler = 'nested' to fit it looks fine. The setting affects how the kernel density estimates are done.

Thank you very much for pointing this out.

I made this change but it seems that it fixed the 1d plot for one of the parameters that didn't;t look right before but not all of them (parameter 'q'; red line). Did you run the script yourself and the output looks different to the figure I am attaching below? (I even updated to the latest version of getdist just to be sure there was nothing wrong with that)

getdist_issue_#57_figure_2

Hmm, it gets confused sometimes by these very broad tails of very low likelihood included in nested chains. The effective number of sample is also very low in those chain files, and probably not enough to make reliable plots. e.g. try setting smooth_scale_1d=0.3 (likewise for 2d) to see more of the actual sampling-noise structure.

Cutting out more of the very low likelihood points by using e.g. ignore_rows=0.1 would fix it. The min_weight_ratio parameter is used to cut negligible-weight points when loading from file and could be increased, could also cut them manually.

I've tried adding a tweak to prevent is using a very large auto bandwidth when there are few effective samples and broad very-suppressed tails - try 24de0b7