Out-of-sample random-walk time series prediction

Looking at the prophet example (see here), I notice that at the end when he makes an out-of-sample prediction, he does it by manually drawing his own samples and using the inferred quantities from the model to model the trend in the future.

My question is this: Is there a way to do OOS time-series prediction for models with a trend (like eg the random-walk deep net here) by relying on the same OOS ‘trick’ of using tensor.set_value() that is prevalent in models that aren’t based on time-series? Or must one always do it ‘manually’ (like eg in the prophet example)?

I’ve already tried to do this myself, but I run into shape problems because the in-sample random walk inference was on data of size T, but I’m trying to predict on data of size 1. Also, not sure if the random walk is able to use the t=T value it got in the in-sample inference and use it as the prior for the t=T+1 value.

[There are quite a few questions on time-series prediction, so it’s possible I have missed this question already. ]

EDIT: Maybe my question is phrased a bit confusingly. Really I’m asking: Is there a way to make an out-of-sample time-series prediction using pm.sample_posterior_predictive() with a model that has serial auto-correlation (like eg GaussianRandomWalk)?

Does this help? If your observed variable is a pandas series or data frame column with missing values, pymc3 will automatically ‘interpolate’, which in this case is actually ‘predicting’:

1 Like

Yes! this is great!

Are there any docs anywhere I can read about this automatic interpolation?