Turing Sampling specified parameters

Let’s try to abstract this a bit. here’s pseudocode:

  1. loop over x
  2. collect all the y’s that have that x
  3. collect all the z’s that have one of those y’s
  4. compare the y,z values to predicted y,z values for that given x.
  5. repeat until all x exhausted

if that’s what you’re up to, then you’re on good footing I think.

What you want is something with the flavor

@addlogprob(logpdf(MvNormal(predictions,covariances),observedvals)

because as you say, if you put your “collected” observedvals on the left side it will treat it like a parameter.

I think so long as you are looping over all your data, and just looking at it in irregular “slices” at a time, you will have a valid model, it’s just a computational problem that needs fixing as above with @addlogprob!

1 Like