# Computation 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"
#Must execute the commands below
#h2o::h2o.init() # Initialize h2o
#invisible(h2o::h2o.no_progress()) # Turn off progress bars
# out <- tts.DeepLearning(y=dep, x=ind, train.end,arOrder=c(2,4),
# xregOrder=c(0,1,3),type="both",initial=FALSE)
#testData2 <- window(out$dataused,start="2009-01-01",end=end(out$dataused))
#P1<-iForecast(Model=out,Type="static",newdata=testData2)
#P2<-iForecast(Model=out,Type="dynamic",n.ahead=nrow(testData2))
#tail(cbind(testData2[,1],P1))
#tail(cbind(testData2[,1],P2))
#h2o::h2o.shutdown(promp=FALSE) # Remember to shutdown h2o when all works are finished.
Run the code above in your browser using DataLab