Can somebody please provide me with a minimal working example of sample_posterior_predictive() in the context of Bayesian Linear Regression? I have tried working with the example notebook, but attempting to use pm.set_data() on my data causes key errors. The procedure I am trying to build is as follows:
- Get some random dataset (e.g. Iris)
- Split data into training and test set
- Construct a linear model to predict one column as function of the other columns, choose some priors, fit using training data
- Sample the posterior distribution
- Sample the predictive posterior distribution using the test set
I’m struggling with point 5). I can send my notebook if you wish