View source: R/explain_forecast.R
get_data_forecast | R Documentation |
Set up data for explain_forecast
get_data_forecast(
y,
xreg,
train_idx,
explain_idx,
explain_y_lags,
explain_xreg_lags,
horizon
)
y |
A matrix or numeric vector containing the endogenous variables for the model. One variable per column, one observation per row. |
xreg |
A matrix containing exogenous regressors for the model. One variable per column, one observation per row. Should have nrow(data) + horizon rows. |
train_idx |
The observations indices in data to use as training examples. |
explain_idx |
The observations indices in data to explain. |
explain_y_lags |
Numeric vector Indicates the number of lags of y to include in the explanation. |
explain_xreg_lags |
Numeric vector Indicates the number of lags of xreg to include in the explanation. |
horizon |
The forecast horizon to explain. |
A list containing
The data.frames x_train and x_explain which holds the lagged data examples.
A numeric, n_endo denoting how many columns are endogenous in x_train and x_explain.
A list, group with groupings of each variable to explain per variable and not per variable and lag.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.