-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add sampling with dense mass matrix #9
Comments
The way to go would be:
|
I will try that. |
Perfect |
I tried it in the one_bundesland notebook in my fork: https://github.com/emilIftekhar/covid19_inference |
Thanks, could you make some plots, to compare the different ess of the variables? |
How urgent do you need it? If it is ok, I would first tackle some of my other tasks today. I would probably get to this issue again tomorrow. |
No, it isn't so urgent. And yes, this issue takes a bit of time to make it right |
In order to try the module from master repo, I have created a new environment on my computer, cloned the repo and then installed it. But now my jupyter notebook has trouble importing from pymc3. Do you know what could have gone wrong? |
No, what is the error message?
…On Sat, Apr 25, 2020, 16:45 emilIftekhar ***@***.***> wrote:
In order to try the module from master repo, I have created a new
environment on my computer, cloned the repo and then installed it. But now
my jupyter notebook has trouble importing from pymc3. Do you know what
could have gone wrong?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHYEN33NFJPLO7RNB46E73ROLZPDANCNFSM4MKWYWKA>
.
|
ImportError: cannot import name 'Model' from 'pymc3' (unknown location) Where is my new pymc3 folder supposed to be? Maybe that is the problem. I cloned it into the main covid19_inference directory. |
I think the simplest is to install it via pip: https://stackoverflow.com/questions/19943022/import-a-python-library-from-github/43261155#43261155 |
Ok reinstalled it, but the full mass matrix option does not seem to work yet. `~/anaconda3/envs/githubPymc3/lib/python3.8/site-packages/scipy/linalg/decomp_cholesky.py in _cholesky(a, lower, overwrite_a, clean, check_finite) LinAlgError: 2-th leading minor of the array is not positive definite` Should I get back to doing it manually or do you think it is worthwhile to keep trying it with the new module? |
Mmh, it could also be that this error is due to our model. That some gradient can't be calculated. You could first try, whether a model without change points works. These are the tricky bits |
With the new make_I_prior the correlation between variables is in general relatively low in the models. As such, one wouldn't gain much by a dense matrix. Closing it for now |
For a better performance, it could be usefull to sample with a full mass matrix, instead only of the diagonal. The newest not yet released version (3.9) of PyMC3 has it as option in pm.sample, but the different functions needed for it are already in earlier releases.
The goal would be to implement the sampling that works in PyMC 3.7 and 3.8 and test whether it is more performant (higher effective number of samples).
References to get started:
pymc-devs/pymc#3596
pymc-devs/pymc#3845
https://dfm.io/posts/pymc3-mass-matrix/
The text was updated successfully, but these errors were encountered: