Defines rolling slices
rolling_predict.Rd
Sometimes your validation or testing data has more values than the horizon
of your model but you still want to create predictions for each time step on
them. rolling_slice
only generates the slices and can be useful for debuging
purposes.
Usage
rolling_predict(object, past_data, new_data, step = NULL)
rolling_slice(object, past_data, new_data, step = NULL)
Arguments
- object
a model object for which prediction is desired.
- past_data
A
data.frame()
with past information for creating the predictions. It should include at leastlookback
values - but can be more. It's concatenated withnew_data
before passing forward. IfNULL
, the data used to train the model is used.- new_data
A
data.frame()
containing a dataset to generate predictions for. In general it's used to pass static and known information to generate forecasts.- step
Default is the step to be the same as the horizon o the model, that way we have one prediction per slice.