-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
sample_smc #319
Comments
Hi, I can tackle this could someone assign the issue to me? |
@myravian could you try your example running it from this branch? I may have a fix https://github.com/ciguaran/pymc-experimental/tree/ciguaran_fix_smc_bj . Also super interested to know what are you using SMC for, it would be great if it would become an example notebook on how to use it!. let me know. |
Unfortunately I still have the same error message:
I don't have a straightforward and simple illustration of the way I use SMC, but the gist of it is that I ran an astrophysical code to compute predictions corresponding to several 100 thousand parameter sets. Based on a set of observables I try to infer the parameters. Of course there are various issues such as regularity/completeness of grid and interpolation, but the main issue is the complex, multi-modal posterior distributions that we expect. From all the proof of concept and validation tests we did, SMC has been a great way to probe the prior space and to handle such difficult posteriors (provided the kernel parameters are well tuned). I'm by no means an expert in statistics and I rely a lot on empirical knowledge so I'm sure I'm not doing everything right though...! |
Could you share a full python file that reproduces the error? I've run the example you posted at the very beginning and it does work for me 🤔 . |
Here would be the script: from sampling_smc_ciguaran import sample_smc_blackjax as sample_smc with pm.Model() as model:
` |
Hi! so I was able to run the example you just shared via installing pymc-experimental from the branch.
is it possible that you are still using pymc-experimental from master? |
You're right, I was not using the proper versions, just tested it and it seems to work fine, thanks for the modifications! |
Hi there,
I was testing pymc_experimental/inference/smc/sampling.py and noticed the following issues:
Thanks a lot for the SMC blackjax implementation, it's very useful!
Cheers,
VIan
PS: here's some code that produces the error
`
real_a = 0.2
real_b = 2
x = np.linspace(1, 100)
y = real_a * x + real_b + np.random.normal(0, 2, len(x))
with pm.Model() as model:
a = pm.Normal("a", mu=10, sigma=10)
b = pm.Normal("b", mu=10, sigma=10)
# either of the following lines produces an error
# c = pm.Normal("c", mu=10, sigma=10, shape=(1,))
# d = pm.Dirichlet("d", [1, 1])
`
The text was updated successfully, but these errors were encountered: