*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 <mohitdhing...@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* >
gaussian_process_matern_3600.pdf
Description: Adobe PDF document
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.