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

Conditional sampling with vmap #157

Open
ipashchenko opened this issue Feb 26, 2023 · 1 comment
Open

Conditional sampling with vmap #157

ipashchenko opened this issue Feb 26, 2023 · 1 comment

Comments

@ipashchenko
Copy link

ipashchenko commented Feb 26, 2023

Hi!

As discussed in #39 one has to use vmap with numpyro plate. But how to obtain a conditional samples (e.g. on a finer X grid) in that case? In this tutorial it is done as follows (but w/o vmaping):

numpyro.deterministic("pred", gp.condition(y, true_t).gp.loc)

However, I can't get GaussianProcess instance out of the vmap-ed function build_gp (as in #39).

Thanks in advance!
Ilya

@ipashchenko
Copy link
Author

Another unclear thing for me with plate and vmap usage in #39 is when I have a different number of observations for each group in a hierarchical model (e.g. lightcurves with different number of data points for different objects). In that case using numpyro.handlers.mask is suggested here. But this implies using the second plate (per-observation). Is there any workaround?

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

1 participant