# NOT RUN {
# Cross-validation takes time, example below is commented.
data("macrodata")
dep<-macrodata[,"unrate",drop=FALSE]
ind<-macrodata[,-1,drop=FALSE]
# Choosing the dates of training and testing data
train.end<-"2008-12-01"
#RNN with LSTM network
#LSTM<-ttsLSTM(y=dep, x=ind, train.end,arOrder=c(2,4), xregOrder=c(1,4),
# memoryLoops=5, type=c("none","trend","season","both")[4])
#testData3<-window(LSTM$dataused,start="2009-01-01",end=end(LSTM$data))
#P1<-iForecast(Model=LSTM,newdata=testData3,type="staticfit")
#P2<-iForecast(Model=LSTM,newdata=testData3,type="recursive")
#tail(cbind(testData3[,1],P1,P2))
# }
Run the code above in your browser using DataLab