Learn R Programming

tsensembler (version 0.0.5)

update_ade: Updating an ADE model

Description

update_ade is a generic function that combines update_base_models, update_ade_meta, and update_weights.

Usage

update_ade(object, newdata, num_cores = 1)

# S4 method for ADE update_ade(object, newdata, num_cores = 1)

Arguments

object

a ADE-class object.

newdata

data used to update the ADE model. This should be the data used to initially train the models (training set), together with new observations (for example, validation set). Each model is retrained using newdata.

num_cores

A numeric value to specify the number of cores used to train base and meta models. num_cores = 1 leads to sequential training of models. num_cores > 1 splits the training of the base models across num_cores cores.

See Also

ADE-class for building an ADE model; update_weights for updating the weights of the ensemble (without retraining the models); update_base_models for updating the base models of an ensemble; and update_ade_meta for updating the meta-models of an ADE model.

Other updating models: update_ade_meta, update_weights

Examples

Run this code
# NOT RUN {
specs <- model_specs(
 learner = c("bm_svr", "bm_glm", "bm_mars"),
 learner_pars = NULL
)

data("water_consumption")
dataset <- embed_timeseries(water_consumption, 5)
# toy size for checks
train <- dataset[1:300, ]
validation <- dataset[301:400, ]
test <- dataset[401:500, ]

model <- ADE(target ~., train, specs)

preds_val <- predict(model, validation)
model <- update_ade(model, rbind.data.frame(train, validation))

preds_test <- predict(model, test)


# }

Run the code above in your browser using DataLab