GithubHelp home page GithubHelp logo

Comments (6)

brinckmann avatar brinckmann commented on August 14, 2024 1

How many chains do you have? The accuracy of the Gelman-Rubin convergence diagnostic is proportional to 1/Nchains and is therefore unreliable for a small number of chains. I usually run with 8 chains and recommend a minimum of 4. Does your posterior appear to be multimodal? Maybe you can email me the plots and I'll have a look.

from montepython_public.

brinckmann avatar brinckmann commented on August 14, 2024

Hi Ivan,

There are a couple of differences. MontePython has the feature that it can remove the non-markovian part of the chains.

By default the code will remove everything since the last time the covmat was updated. As of v3.1 this behavior is controlled through the flags --keep-non-markovian, which keeps everything, and --keep-only-markovian, which removes everything non-markovian, i.e. removes everything since the last time the jumping factor or covmat was removed. If you want to directly compare to GetDist you should run with flags --keep-non-markovian and --keep-fraction 0.7, where the latter will remove the first 30% of the chains.

Additionally, MontePython will use a burn-in removal criteria, removing the start of the chains where the -Delta loglkl > 3. This is hard-coded in montepython/analyze.py line 40: LOG_LKL_CUTOFF = 3. In some rare cases it can be beneficial to modify this criteria as well, but in most cases the default settings should be sufficient.

Note that in any case the plots will look different by default as the two codes use different smoothing options. See Appendix C of Brinckmann & Lesgourgues 1804.07261 for more details.

Best,
THejs

from montepython_public.

ivandebono avatar ivandebono commented on August 14, 2024

Thank you, Thejs.

What are the best chain analysis options to help MontePython output sigma values for all the parameters? I tried keeping non-Markovian points but it didn't help.

from montepython_public.

brinckmann avatar brinckmann commented on August 14, 2024

The best is to run the chains for longer until they properly converge, but you can also try to adjust the histogram binning with --bins, which sometimes helps you get some preliminary values while waiting.

from montepython_public.

ivandebono avatar ivandebono commented on August 14, 2024

That's exactly the problem. The chains seem to have converged.

The acceptance rate for all the chains (I have 8) is 0.25. For the parameters in question, I get R-1 values of 0.000773 and 0.002087.

from montepython_public.

SuvedhaNaik avatar SuvedhaNaik commented on August 14, 2024

Hello @ivandebono, @brinckmann ,

Could you please share any updates on this issue?

I'm also stuck with similar problems.
Currently I have 8 chains of 7X10^5 steps each. R-1 for the parameters I'm interested in are 0.000216 and 0.000171. However, the posteriors are multimodal and uniform [
Posterior.pdf
](url). Sigma values are not generated. I'm running with flags --update 50 --superupdate 20 using Metropolis-Hastings sampling then analyzing with the flags --keep-non-markovian --keep-fraction 0.7 --want-covmat

How long should I go? or any other algorithms can be used to resolve this issue?
Any suggestions would be of great help.

Thanks in advance,
Suvedha

from montepython_public.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.