Gaussian process regression and optimizing an RBF kernel for forecasting?

I'm using gaussian process regression with an RBF kernel to forecast a time series. I'm using GaussianProcessRegression in sci-kit learn, with a kernel: 1**2 * RBF(length_scale=1). Target values are normalized.

This does a great job of fitting to the time series training set, but on the unseen testing set, it consistently underestimates the actual values. Like this:

Are there parameters in an RBF kernel, or a custom kernel, that can be used to correct this under-estimation?

For example, could I utilize the ConstantKernel from sci-kit learn to create a custom kernel which scales the RBF kernel to the mean of the series. Like this:

ConstantKernel(constant_value=1) + 1**2 * RBF(length_scale=1)

• Gaussian process regression typically assumes a stationary data series. Is there a trend in the data? For example, if your test set is "future" and your train set is "history", then perhaps the test set has higher values on average? (e.g. if you switch the role of train vs. test sets, does your model then over-estimate? assuming you are using a time-symmetric kernel) – GeoMatt22 Nov 3 '16 at 19:13
• @GeoMatt22 The data is not stationary, however in the example provided on the sklearn website, they get a good fit on non-stationary data with a custom kernel: scikit-learn.org/stable/auto_examples/gaussian_process/… – user1566200 Nov 3 '16 at 19:21
• @GeoMatt22 To be more clear, the test set will indeed have higher average values than the history, because of the trend. I was hoping the RBF kernel would take this into account (as in the sklearn example) – user1566200 Nov 3 '16 at 19:22
• If your data is non-stationary, you should plot the entire time series (train + test), like the picture shown at your link. Otherwise it will be hard to get useful answers for your particular problem. – GeoMatt22 Nov 3 '16 at 19:44