ts.prepare.data | R Documentation |
The LSTM (Long Short-Term Memory) model is a Recurrent Neural Network (RNN) based architecture that is widely used for time series forecasting. Min-Max transformation has been used for data preparation. Here, we have used one LSTM layer as a simple LSTM model and a Dense layer is used as the output layer. Then, compile the model using the loss function, optimizer and metrics. This package is based on 'keras' and TensorFlow modules.
ts.prepare.data(ts, xreg = NULL, tsLag, xregLag = 0)
ts |
Time series data |
xreg |
Exogenous variables |
tsLag |
Lag of time series data |
xregLag |
Lag of exogenous variables |
dataset with all lags created from exogenous and time series data.
y <- rnorm(100,mean=100,sd=50)
x1 <- rnorm(100,mean=50,sd=50)
x2 <- rnorm(100, mean=50, sd=25)
x <- cbind(x1,x2)
ts.prepare.data(y, x, 2, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.