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

Python postprocessing functions yielding different results #3

Open
tripathi opened this issue Mar 7, 2016 · 7 comments
Open

Python postprocessing functions yielding different results #3

tripathi opened this issue Mar 7, 2016 · 7 comments

Comments

@tripathi
Copy link

tripathi commented Mar 7, 2016

Hi!

When running the Gaussian python example from commit 190180.. on a Mac (OSX10.10) with Python 2.7, it runs into NaNs for log_x_diff, and thus log_z when calculated by analysis.py's postprocess->compute_stats function. See
analysispy.txt

However, if I manually postprocess the output using the postprocess function in deprecated.py, I get a reasonable value for log_z. See
deprecatedpy.txt

Should I continue to use the deprecated function?

Note I've used MACOSX_DEPLOYMENT_TARGET=10.10 python setup.py install for builds (although I get the same result with TARGET=10.9).

@dfm
Copy link
Collaborator

dfm commented Mar 8, 2016

I can't reproduce this even with the same commit. What version of numpy? It's doing something weird with the way it handles underflow...

@tripathi
Copy link
Author

tripathi commented Mar 8, 2016

Thanks for the quick response! I have numpy 1.9.2 (installed using canopy).

@dfm
Copy link
Collaborator

dfm commented Mar 8, 2016

Can you also attach the text files that the Gaussian example saves?

@tripathi
Copy link
Author

tripathi commented Mar 8, 2016

posterior_sample.txt
weights.txt
levels.txt
sample_info.txt
sample.txt
sampler_state.txt
sample_log_X.txt (You can see all the infs)
stats.txt

Note these are from a different run as that mentioned above, so I'm also attaching the new log file
newlog.txt

Thanks!

@omaclaren
Copy link

(I just came across the same issue btw - I'll try to post a more informative comment later)

@eggplantbren
Copy link
Owner

eggplantbren commented Aug 24, 2016

The workaround is to always use

import dnest4.classic
dnest4.classic.postprocess()

@omaclaren
Copy link

Awesome, thanks, this worked for me.

And, I just realised that this is also discussed under #10

(sorry!). So to confirm - classic works for me but the default doesn't (i.e. it gives nans). I'm running Python 2.7.11.

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

4 participants