[R] Time Series Prediction using Gaussian Process

Mohit Dhingra mohitdhingras at gmail.com
Mon Dec 10 04:13:19 CET 2012


*Hello All,*

I tried figuring out the problem, I was trying to use laplacedot to predict
the long term, which however would not do a good job.

Then, I tried to do a point by point prediction and building the model
again, everytime. It shows me better results. I tried writing my kernel
function (matern covariance function), and attached is the result of that.
Red lines show the fit and blue lines show the prediction, however, it
always lag the actual data. Now, I am trying to use neural network
covariance function. Is that available in R?



*
----------------------------
Thanks & Regards
Mohit Dhingra
+919611190435*



On 5 December 2012 11:15, Mohit Dhingra <mohitdhingras at gmail.com> wrote:

> *Hello All,*
>
> I am trying to do a time series prediction using Gaussian Processes (need
> to try with different kernel functions) using R.
>
> I am using kernlab package to do so. But I am not sure how do I predict
> for new data.!!
>
> I used following to train the model :
>
> >gp = gausspr( t, weekdays1_vector_t_t_trunc, kernel="laplacedot",
> scaled=FALSE )
>
> Then, I predict using predict function :
> >pred = predict(gp, t_new)
>
>
> But, when I plot the data, the model seems to fit quite ok, but prediction
> is nowhere close to the actual data.
>
> >ts.plot(weekdays1_vector_t_t_trunc-
> mean(weekdays1_vector_t_t_trunc),xlim=c(0,600))
>
> >lines(alpha(gp), col="red")
>
> >lines(t_new, pred, col="blue")
>
> *
>
> *
> *
> I am attaching the figure. Can someone please help me out..
> *
> *
>
> *
> *
> ----------------------------
> *
> *Thanks & Regards
> Mohit Dhingra
> +919611190435*
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gaussian_process_matern_3600.pdf
Type: application/pdf
Size: 9911 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121210/87ce0f80/attachment.pdf>


More information about the R-help mailing list