Work with a 3rd data set using EP, other than X and y



I have a model where the predictor variables comes in two sets X and Z, where Z simply has one more predictor added to the end of X. What’s the best way to code this? I have tried creating a separate input data set as Z, however, at run time, the model gets confused with the declaration vs found.

RuntimeError: mismatch in dimension declared and found in context; processing stage=data initialization; variable name=z; position=0; dims declared=(6,80,6); dims found=(100,80,6)

The reason for finding 6 instead of 100 is because I use 16 sites in EP. I think EP makes adjustments for X but not for Z?

What’s the best approach to solve for this problem? Should I simply use an over complete data set and trim off the last element before using?


In the current epstan master-branch implementation, one can use arg A_n to provide additional partitioned data for the model. For example, if one provides A_n = {'Z': Z}, the array Z will be sliced similarly as X and y and provided as named variable 'Z' for each site.

The current version is not most user friendly, but it should work. One can also manually edit the code to work with different models.

Hopefully this helps.
T Sivula


I remember now that you said that once before. Thanks!