updateBaseStatistics() may be missing a call to setMeans()
Closed this issue · 3 comments
This is not a pb in getdist per se, rather in Multinest which produces chains output as -2 ln(like) instead of -ln(like).
Reading them with getdist works fine for anything related to marginalized distributions but produces erroneous values for max like and friends.
An easy way to deal with that is, after loading the chains, is dividing the loglike array by 2, and updating statistics with updateBaseStatistics:
if mc.sampler == 'nested':
mc.loglikes = mc.loglikes/2.0
mc.updateBaseStatistics()
The max likes are now correct, but this still produces erroneous output for the mean likes which end up not being updated.
An extra call to
mc.setMeans()
is needed. Would it make sense to automatically do so within "updateBaseStatistics()"?
NB: Notice that "cooling" the chains would not work, as we don't want to change weights.
This sounds like an issue for Multinest.
The Cobaya nested sampling (Polychord) outputs should produce consistent results (and would also have sampler='nested').
Alternatively one could support override of the default by e.g. a value in chain.properties.ini.
Yes, but it enlightens that updateBaseStatistics() is not updating mean statistics. Is it on purpose?
Normally it is OK because _weightsChanged sets means=None.
But I think I agree getMeans might as well be there (or set means=None before calling getVars), since no additional cost in standard case and then also works if you manually change loglikes.