How to use a TensorVariable in GP predict method

Hi daniel-saunders-phil,

I can give more context, and chances are I will be posting more questions on the project I am currently battling. I will try to summarize the big picture as best as I can:

  • I have data that describes some physical phenomena with output \mathbf Y and that depends on some inputs \mathbf x. The idea is to determine what \mathbf x_\text{true} (and a credible interval) would best reproduce the data.
  • I have K theories/models that have been developed to describe the phenomena: \{\mathcal M_i\}_{i=1,\ldots,K}.
  • I want to use a pm.Mixture distribution to combine these models in a likelihood, which I would use to figure out posterior distribution p(\mathbf x | \mathbf Y) for \mathbf x.
  • These models are cost-intensive to evaluate, so I want to use emulators (gaussian processes) to model them. So, ideally, the emulator consumes a sample \mathbf x_\text{sample} and spits our a prediction \mathbf Y_{\mathcal M_i} for each theory/model.

Therefore, being able to sample the uniform distribution in important. Could I adopt you example and register x_new using pm.Deterministic to record its chain?

1 Like