Skip to content

Conversation

@danielturek
Copy link
Member

Addresses NCT issue 296.

This PR adds support for MCMC sampling of partially-observed multivariate normal nodes. That is, multivariate-distributed nodes, where some of the dimensions are observed data, and some of the dimensions are unobserved (latent). The partial_mvn sampler essentially operates by assigning univariate RW samplers to the (individual) unobserved dimensions of partially-observed (and therefore also partially-unobserved) MVN-distributed nodes.

More specifically, several cases for sampling the unobserved dimensions are handled:

  • Any latent dimensions which have no stochastic dependencies are assigned posterior_predictive samplers.
  • If multivariateNodesAsScalars = TRUE, then all remaining unobserved dimensions are assigned univariate RW samplers.
  • If multivariateNodesAsScalars = FALSE, then all remaining unobserved dimensions are assigned a single multivariate RW_block.

A variety of test cases are also added.

@danielturek
Copy link
Member Author

Testing passed. I welcome any thoughts or review from @paciorek or @perrydv

@paciorek
Copy link
Contributor

So do we think the most common use case would be that y[1:n] is a leaf node containing some data and some non-data elements and therefore the non-data are predictive nodes? In that case it looks like we assign a RW_block sampler. So @danielturek I'm not sure what you meant by "Any latent dimensions which have no stochastic dependencies are assigned posterior_predictive samplers." More substantively, should we work out the true MVN conditional distribution in that situation and sample from the true predictive? If we do think this is a common case, then I think it might be worth it. (And I would be happy to lend a hand if we decide to do it.)

@danielturek
Copy link
Member Author

@paciorek Please see the addition of the partial_mvn_pp sampler ("partial MVN posterior predictive" sampler), which is used internally in the partial_mvn sampler.

When one or more dimensions (from among the unobserved dimensions) of a partially-observed MVN node themselves have no data dependencies, then a partial_mvn_pp sampler is now assigned to these dimension(s) - instead of either RW or RW_block samplers, as before. This new partial_mvn_pp generates draws directly from the conditional MVN distribution.

@paciorek A second set of eyes would be appreciated. There might also be some efficiency improvements with the linear algebra within the partial_mvn_pp sampler, which could be improved upon from the present implementation.

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

Successfully merging this pull request may close these issues.

2 participants