Skip to content

Conditional sampling with vmap #157

Description

@ipashchenko

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

Activity

  1. ipashchenko commented on Feb 27, 2023

    @ipashchenko
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions