Hello,
I’m currently fitting a model and want to see predictions on unseen data that was not used in the model fitting process. I know that you can simply reset the “incoming” data before posterior predictive sampling using pm.set_data(new_data={...})
, but this requires first defining data variables using pm.Data()
when defining the initial model.
problem: I use VI for parameter estimation and would like to make use of minibatches. But if i define the minibatches first, and then turn them into data variables, which is required since I can’t reset them otherwise, I get a TypeError: Shared variable values can not be symbolic, when setting e.g. obs = pm.Data("obs", obs_minibatch)
.
This used to work in older versions of pymc as seen in this notebook.
This doesn’t seem to work anymore unfortunetely. What is the workaround now? Should I define a new identical model but with data variables instead of minibatches and then use posterior predictive sampling on the trace of the previous model as mentioned here or are there other ways?