我是CARET包的新手。我想知道它如何用于预测多变量时间序列数据。
data(economics)
library(caret)
library(kernlab)
myTimeControl <- trainControl(method = "timeslice", initialWindow =200,horizon =50, fixedWindow = TRUE)
svmRbftune <- train(unemploy ~ pce + pop + psavert + uempmed,
data = economics[1:250,], method = "svmRadial",
tunelength = 14, trControl = myTimeControl)
svmpredict<-predict(svmRbftune,economics[251:350,])
但是,我们怎样才能预测从这里前进一步