-
Notifications
You must be signed in to change notification settings - Fork 5
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
mumpce plots failing due to numerical errors causing linalg error #73
Comments
So what we need to do is... |
Need to put a try and except mumpce plots colorbars. for a totally different reason, I got this (I believe this was related to not having enough contour lines in the range displayed, for the settings I had).
Suffice to say there is a work around by putting a try and except around this block: if contour_settings_custom["colorbars"] == True: |
To run the example attached to this post in the following zip file, use runfile_Example8_optimization_mcmc.py. It should take under a minute to run.
200323_2.2a-MiniExample.zip
I received this error:
I think it is because a matrix (probably posterior cov) had negative or zero values due to numerical errors or insufficient sampling.
https://stackoverflow.com/questions/21604498/numpy-cholesky-decomposition-linalgerror
I think that what we should do is give people a warning while also forcing the matrix to become positive definite.
For forcing:
There is some r code, don't now if it's in python
https://rdrr.io/cran/stsm/man/force-defpos.html
here is a small python script: https://stackoverflow.com/questions/43238173/python-convert-matrix-to-positive-semi-definite
For warning:
I found that for my case increasing hte mcmc step length and increasing the mcmc_modulate_accept_probability to 1000 solved my problem. More details of what I think should be put in the warning will be in the comments below.
The text was updated successfully, but these errors were encountered: