Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other_output #160

Open
pmehta08 opened this issue Dec 7, 2024 · 6 comments
Open

Other_output #160

pmehta08 opened this issue Dec 7, 2024 · 6 comments

Comments

@pmehta08
Copy link

pmehta08 commented Dec 7, 2024

Hi,
The other_output saves all the model for a given EMCEE run. theno. of rows of the file should ideally match the n_walkersxn_steps, but it does not. But, the no. of rows is either shorter or longer than this number .

Could you please tell me if the other_output is saving duplicate entries, or rejected models or only accepted models?

@rpoleski
Copy link
Owner

rpoleski commented Dec 9, 2024

other_output is saving all the models for which chi2 is calculated.

@pmehta08
Copy link
Author

pmehta08 commented Dec 9, 2024

  1. Can you please explain why the length of the file is not nstepsxnwalkers? I have taken 1000x500 nsteps and nwalkers, more most of my cases it saves 502000 models and for some of them it saves 40000. Why are these entries random? Is not it supposed to be nstepsxnwalkers?

  2. What is posterior.npy is saving? There is no match between posterior.npy and other_output. Why is that so?

@rapoliveira
Copy link
Contributor

The .npy posterior file has shape (nwalkers, nsteps-nburn, ndim), as it should be.

For ob03235_2_full.yaml, the .txt file with all_models contains 119 lines, in fact more than the 20x4 it should have.
That's because the _ln_like() function (which prints every model to the file) is being called in more places than only in _ln_prob(). @rpoleski, I can work on it if you want.

@pmehta08
Copy link
Author

Thanks@rapoliveira.
Nevertheless, there is no match between posterior.npy and other_output text file containing all_models. Should not the entries in posteriors.npy should overlap with text file containing all models?
Also, the set of best-fitted parameters is not in posterior.npy

@rpoleski
Copy link
Owner

Please provide reproducible example for that. Please fix numpy seed at the top of ulens_model_fit.py for that purpose.

@pmehta08
Copy link
Author

Alright, but before that can you please answer my question if the posterior file should contain the best-fit values or not? I have checked this with multiple test-runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants