Giter Club home page Giter Club logo

Comments (6)

segasai avatar segasai commented on July 20, 2024

I'm sorry but there is not enough info here. i.e. which yellow region you are talking about and what you think is wrong. Please provide more details including plots to illustrate your question
https://github.com/joshspeagle/dynesty/blob/master/demos/Demo%201%20-%20Overview.ipynb -- check here and in other notebooks for how plots should look like.

from dynesty.

wdqfdr avatar wdqfdr commented on July 20, 2024

Thank you for your reply and I'm sorry for the delay. I want to ask some questions about dynesty results and plots. I'm using dynesty to do some work about the Bayes factor and posterior estimation.
The question I asked earlier is whether the posterior probability distribution results provided by dynesty are the results after the region colored (yellow) in traceplot at -lnX, which means where the samples are weighted? This is the traceplot:
dyresult
However results are now found to have significant deviations. The result looks like:

35907it [1:54:23, 5.23it/s, batch: 4 | bound: 28 | nc: 1 | ncall: 1027630 | eff(%): 3.449 | loglstar: -93.740 < -86.208 < -88.348 | logz: -139.041 +/- 0.247 | stop: 0.872]
dyresult
The truth values only show in x1 and x5. Through dynesty, I cannot obtain the original injected values, and I have also tried adjusting the bounds and samples, but the results remain the same. In runplot, compared to the graphs in your example, the likelihood seems to have an issue. :
dyresult
I am so sorry to bother you. I'm new to mcmc type calculation, so I wanted to ask what adjustments can be made to ensure that I can obtain the correct results.

from dynesty.

segasai avatar segasai commented on July 20, 2024

It looks like your problem have multiple modes and likely dynesty is not picking up the right one.

In the left panel of the very first plot you can see multiple modes and the code jumping from one to another.
It is hard to give a universal solution to this problem as if you have a very broad prior with many modes, it's impossible to guarantee that you find one.

If your problem is well posed and you are confident that that the true value of model parameters return very high likelihood you may want to try using more walkers/ restrict prior range to help the mode discovery. But it's really hard to tell without having an idea how the likelihood surface looks like

from dynesty.

wdqfdr avatar wdqfdr commented on July 20, 2024

Thank you for your reply! It works! I get a nice posterior distribution with more walkers in rwalk method. I'm a bit confused about the traceplots of results.

dyresult2

Is the posterior distribution of the parameters provided by dynesty starting from where I marked? (it mean where the samples are weighted?)

from dynesty.

segasai avatar segasai commented on July 20, 2024

Glad it worked better.

The posterior distribution is not just truncated at the point you have marked. The posterior is constructed from weighting of all the live-points. The weights for live points below the 'yellow region' will be extremely small.

from dynesty.

wdqfdr avatar wdqfdr commented on July 20, 2024

Thank you very much for your help! It has been really helpful to me, and I will try more calculations again.

from dynesty.

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.