ttsAutoML {iForecast} | R Documentation |
Train time series by automatic machine learning of h2o
provided by H2O.ai
Description
It generates both the static and recursive time series plots of H2O.ai object generated by package h2o
provided by H2O.ai.
Usage
ttsAutoML(y,x=NULL,train.end,arOrder=2,xregOrder=0,maxSecs=30)
Arguments
y |
The time series object of the target variable, or the dependent variable, with |
x |
The time series matrix of input variables, or the independent variables, with |
train.end |
The end date of training data, must be specificed. The default dates of train.start and test.end are the start and the end of input data; and the test.start is the 1-period next of train.end. |
arOrder |
The autoregressive order of the target variable, which may be sequentially specifed like arOrder=1:5; or discontinuous lags like arOrder=c(1,3,5); zero is not allowed. |
xregOrder |
The distributed lag structure of the input variables, which may be sequentially specifed like xregOrder=1:5; or discontinuous lags like xregOrder=c(0,3,5); zero is allowed since contemporaneous correlation is allowed. |
maxSecs |
The maximal run time specified, in seconds. Default=20. |
Details
This function calls the h2o.automl function from package h2o
to execute automatic machine learning estimation. When execution finished, it computes two types of time series forecasts: static and recursive. The procedure of h2o.automl automatically generates a lot of time features.
Value
output |
Output object generated by train function of |
arOrder |
The autoregressive order of the target variable used. |
data |
The dataset of imputed. |
dataused |
The data used by arOrder, xregOrder |
Author(s)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Examples
# 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"
#autoML of H2O.ai
#autoML <- ttsAutoML(y=dep, x=ind, train.end,arOrder=c(2,4),
# xregOrder=c(0,1,3), maxSecs =30)
#testData2 <- window(autoML$dataused,start="2009-01-01",end=end(autoML$data))
#P1<-iForecast(Model=autoML,newdata=testData2,type="static")
#P2<-iForecast(Model=autoML,newdata=testData2,type="dynamic")
#tail(cbind(testData2[,1],P1))
#tail(cbind(testData2[,1],P2))