Learn R Programming

tsensembler (version 0.1.0)

DETS-class: Dynamic Ensemble for Time Series

Description

A Dynamic Ensemble for Time Series (DETS). The DETS ensemble method we present settles on individually pre-trained models which are dynamically combined at run-time to make a prediction. The combination rule is reactive to changes in the environment, rendering an online combined model. The main properties of the ensemble are:

heterogeneity

Heterogeneous ensembles are those comprised of different types of base learners. By employing models that follow different learning strategies, use different features and/or data observations we expect that individual learners will disagree with each other, introducing a natural diversity into the ensemble that helps in handling different dynamic regimes in a time series forecasting setting;

responsiveness

We promote greater responsiveness of heterogeneous ensembles in time series tasks by making the aggregation of their members' predictions time-dependent. By tracking the loss of each learner over time, we weigh the predictions of individual learners according to their recent performance using a non-linear function. This strategy may be advantageous for better detecting regime changes and also to quickly adapt the ensemble to new regimes.

Arguments

Slots

base_ensemble

object of class base_ensemble-class. It contains the base models used that can be used for predicting new data or forecasting future values;

form

formula;

specs

object of class model_specs-class. Contains the parameter setting information for training the base models;

lambda

window size. Number of observations to compute the recent performance of the base models, according to the committee ratio omega. Essentially, the top omega models are selected and weighted at each prediction instance, according to their performance in the last lambda observations. Defaults to 50 according to empirical experiments;

omega

committee ratio size. Essentially, the top omega models are selected and weighted at each prediction instance, according to their performance in the last lambda observations. Defaults to .5 according to empirical experiments;

select_best

Logical. If true, at each prediction time, a single base model is picked to make a prediction. The picked model is the one that has the lowest loss prediction from the meta models. Defaults to FALSE;

recent_series

the most recent lambda observations.

References

Cerqueira, Vitor; Torgo, Luis; Oliveira, Mariana, and Bernhard Pfahringer. "Dynamic and Heterogeneous Ensembles for Time Series Forecasting." Data Science and Advanced Analytics (DSAA), 2017 IEEE International Conference on. IEEE, 2017.

See Also

model_specs-class for setting up the ensemble parameters for an DETS model; predict for the method that predicts new held out observations; update_weights for the method used to update the weights of an DETS model between successive predict or forecast calls; update_base_models for the updating (retraining) the base models of an DETS ensemble (and respective weights); and dets_hat-class for the object that results from predicting with an DETS model.

Examples

Run this code
# NOT RUN {
specs <- model_specs(
 c("bm_ppr", "bm_svr"),
 list(bm_ppr = list(nterms = c(2, 4)),
      bm_svr = list(kernel = c("vanilladot"), C = c(1,5)))
)

data("water_consumption")
train <- embed_timeseries(water_consumption, 5)[1:500,]

model <- DETS(target ~., train, specs, lambda = 30, omega = .2)

# }

Run the code above in your browser using DataLab