Shape error when making out-of-sample predictions

Do note that in your simplified model, when you change N for predictions you will loose all the information you gained from sampling the posterior of factors, as PyMC will also resample that variable (in this case resampling will be the same as sampling it from the prior)

When a PyMC variable depends on a MutableData that has changed in value between posterior sampling and sample posterior predictive, it assumes what none of what was learned is still valid.

I assume you don’t want to actually resize factors but only output? In that case you should leave factors with a fixed shape

1 Like