# NOT RUN {
###### Predicting with an ADE ensemble
specs <- model_specs(
learner = c("bm_glm", "bm_mars"),
learner_pars = NULL
)
data("water_consumption")
dataset <- embed_timeseries(water_consumption, 5)
train <- dataset[1:1000, ]
test <- dataset[1001:1500, ]
model <- ADE(target ~., train, specs)
preds <- predict(model, test)
# }
# NOT RUN {
###### Predicting with a DETS ensemble
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:700, ]
test <- dataset[701:1000, ]
model <- DETS(target ~., train, specs, lambda = 50, omega = .2)
preds <- predict(model, test)
# }
# NOT RUN {
# }
# NOT RUN {
###### Predicting with a base ensemble
model <- ADE(target ~., train, specs)
basepreds <- predict(model@base_ensemble, test)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab