I’ve got a quite heavy “generated quantities” code bloc in my model. Heavy in both computionnal cost & memory usage.
I know that the “generated quantities” code bloc is executed at every MCMC step, this slows down my model sampling.
I would like to first sample my model without running the “generated quantities” code bloc, and then running it only once, after the sampling procedure ends (using the parameter posterior found during the sampling).
I’d like to do a “Predictive Posterior Check”, but I only need to do it once, not at every sampling step.
Any idea how to do this with pystan ?
Any help appreciated.