# Prediction on hold out data

**URL:** https://discourse.pymc.io/t/prediction-on-hold-out-data/4843
**Category:** Questions
**Created:** [April 11, 2020, 12:58pm UTC](https://discourse.pymc.io/t/prediction-on-hold-out-data/4843 "2020-04-11T12:58:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sojohan](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@sojohan](https://discourse.pymc.io/u/sojohan)
#### Post date: [April 11, 2020, 12:58pm UTC](https://discourse.pymc.io/t/prediction-on-hold-out-data/4843/1 "2020-04-11T12:58:32Z")

</div>

Hi Experts

I am experimenting with Gaussian Process smoothing notebook on some Danish Covid-19 numbers.

I want to make predictions on hold-out data. I have looked at some of the other examples but cant get it to work…When I look at the shape of the postererior it still have the wrong dimension.

```auto
LARGE_NUMBER = 1e5
from theano import shared 
model = pm.Model()

x_shared = theano.shared(train_set.index)
y_shared = theano.shared(y)
with model:
    smoothing_param = shared(0.9)
    mu = pm.Normal("mu", sigma=LARGE_NUMBER)
    tau = pm.Exponential("tau", 1.0/LARGE_NUMBER)
    z = GaussianRandomWalk("z",
                           mu=mu,
                           tau=tau / (1.0 - smoothing_param),
                           shape=y.shape)
    obs = pm.Normal("obs",
                    mu=z,
                    tau=tau / smoothing_param,
                    observed=y)
with model:
    tr = pm.sample(1000, init='advi_map',tune=500, chains=1, cores=1, target_accept=0.95)

x_shared=[0,1,2]
with model:
    # Switch out the observations and use `sample_posterior_predictive` to predict
    #pm.set_data({'x_shared': new_values})
    pred_samples = pm.sample_posterior_predictive(tr, samples=1000)

```

Thanks
