powered by
R command to setup the training and forecasting data for deep learning.
DLdata(x, forerate = 0.2, locY = 1, lag = 1)
T by k data matrix: T data points in rows and k time series in columns.
Fraction of sample size to form the forecasting (or testing) sample.
Locator for the dependent variable.
Number of lags to be used to form predictors.
A list containing:
Xtrain - Standardized predictors matrix.
Ytrain - Dependent variable in training sample.
Xtest - Predictor in testing sample, standardized according to X_train.
Ytest - Dependent variable in the testing sample.
nfore - Number of forecasts.
# NOT RUN { x <- matrix(rnorm(7000), nrow=700, ncol=100) m1 <- DLdata(x, forerate=c(200/nrow(x)), lag=6, locY=6) # }
Run the code above in your browser using DataLab