PolyChord / PolyChordLite

Public version of PolyChord: See polychord.co.uk for PolyChordPro
https://polychord.io/
Other
83 stars 26 forks source link

Value of loglike in output #8

Closed grburgess closed 5 years ago

grburgess commented 5 years ago

I'm trying to figure out if the value of loglike in the getDist output is -2 loglike or loglike. From the root.txt file, it looks like -2 loglike is being passed in.

Cheers

williamjameshandley commented 5 years ago

In the .txt file, it is -2 loglike (as getdist expects). It does actually explicitly say this in the Readme, is there any reason you'd expect this to be otherwise?

grburgess commented 5 years ago

Having a look in the getdist source code: https://github.com/cmbant/getdist/blob/master/getdist/mcsamples.py#L186

It calls this loglike in the input and the object member is names loglike.

Then here:

https://github.com/cmbant/getdist/blob/master/getdist/mcsamples.py#L457

it switches and calls this -2loglike.

This seems to be a naming issue with getdist so I will ping them. It could just be really confusing for people not paying attention. The output that one would get from the posterior object in polychord is -2loglike, but the object is called loglike. I only noticed when wrapping this up in our modeling code that the loglikes between multinest and polychord were really different because I naively accepted the member name as a good description :)

It might be worth it to add a note in the docs somewhere.

williamjameshandley commented 5 years ago

I see! Could you point out the misleading documentation in PolyChord (or better yet, submit a pull request with the documentation that you think would make it clearer)?

grburgess commented 5 years ago

Already working on a PR