Dear All,
Is there a function in GetDist MCSamples which returns bestfit parameter values and minimum -loglikelihood calculated from the chain files (samples) provided?
The naive use of getParamBestFitDict() is resulting in an error "Best fit can only be included if loaded from file and file_root.minimum exists (cannot be calculated from samples)".
Thanks in advance.
Best,
Subhajit
GetDist: Getting bestfit parameter values and minimum -loglikelihood from samples
-
- Posts: 4
- Joined: June 04 2018
- Affiliation: University of Notre Dame
- Contact:
-
- Posts: 4
- Joined: June 04 2018
- Affiliation: University of Notre Dame
- Contact:
Re: GetDist: Getting bestfit parameter values and minimum -loglikelihood from samples
Let me clarify a bit.
I am asking this question in the context of analyzing Montepython output chains. In principle, we have access to the information about the priors of the parameters through the 'log.param' file. But I think GetDist does not read the 'log.param' file. However, is the prior information at all necessary since the output chains already provide -log(likelihood)?
For example, what will go wrong if one sorts the -log(likelihood) of the chains to find the minimum and corresponding data point as the best fit?
Thanks.
Best,
Subhajit
I am asking this question in the context of analyzing Montepython output chains. In principle, we have access to the information about the priors of the parameters through the 'log.param' file. But I think GetDist does not read the 'log.param' file. However, is the prior information at all necessary since the output chains already provide -log(likelihood)?
For example, what will go wrong if one sorts the -log(likelihood) of the chains to find the minimum and corresponding data point as the best fit?
Thanks.
Best,
Subhajit
-
- Posts: 1874
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: GetDist: Getting bestfit parameter values and minimum -loglikelihood from samples
You can get the best fit sample (not the same as the global best fit) using
https://getdist.readthedocs.io/en/latest/mcsamples.html#getdist.mcsamples.MCSamples.getLikeStats
Use Cobaya's minimize function if you actually want the best fit.
https://getdist.readthedocs.io/en/latest/mcsamples.html#getdist.mcsamples.MCSamples.getLikeStats
Use Cobaya's minimize function if you actually want the best fit.