Description Usage Arguments Note See Also Examples
Generic function for forecasting
future values of a time series from an ADE-class
model or a
DETS-class
model.
1 2 3 4 5 6 7 |
object |
predictive model object. A |
h |
steps to forecast |
the forecast
generic in tsensembler assumes that the
data is purely auto-regressive (no external variables), and that the target variable
is the first column of the data provided. For a different data setup, the
predict methods (predict
)
can be used (with successive calls with updates for multi-step forecasting).
predict
for the predict method; update_weights
for updating the weights of a model after forecasting; update_base_models
for updating the base models of an ensemble.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | specs <- model_specs(
learner = c("bm_svr", "bm_glm", "bm_mars"),
learner_pars = NULL
)
data("water_consumption")
dataset <- embed_timeseries(water_consumption, 5)
train <- dataset[1:500, ]
model <- DETS(target ~., train, specs)
model2 <- ADE(target ~., train, specs, lambda = 30)
next_vals_dets <- forecast(model, h = 2)
next_vals_ade <- forecast(model2, h = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.