View source: R/transformation.R
lag_components | R Documentation |
This function shift in time a set of features in order to be used in the training and prediction of the models. It is an important step for the multi-step prediction of autoregressive models, where the estimated output is directly used in the subsequent predictions.
lag_components(
data,
maxLag,
featuresNames = NULL,
predictionStep = NULL,
forceGlobalInputFeatures = NULL,
forceInitInputFeatures = NULL,
forceInitOutputFeatures = NULL,
fillInitNAs = F
)
data |
<data.frame> containing the multiple series to transform. All the series that are not declared in featuresNames are bypassed to the output |
maxLag |
<integer> describing the maximum lags to be considered. One feature will be generated for each lag. |
featuresNames |
<array> selecting the series names to transform (names of the columns in data). |
predictionStep |
optional, <integer> informing of the timestep considered in the prediction. Only used in prediction mode, when training it doesn't need to be described |
forceGlobalInputFeatures |
<list> of values to be considered instead of the original values defined in data. |
forceInitInputFeatures |
<list> of the initial values to consider before the first value defined in data. |
forceInitOutputFeatures |
<list> of the initial values to consider before the first value defined in data. |
fillInitNAs |
<boolean> indicating if the unknown lags should be filled with their last known value. |
<data.frame> containing the same initial information of the data input argument, plus the lagged components as new columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.