Description Usage Arguments Examples
View source: R/ca-classes-methods.r
Constructive aggregation via out-performance contiguity This method denotes the idea of rearranging a portfolio of models (base_ensemble) into different overlapping subsets. These subsets are aggregated (aggregate_subsets) into combined opinions, forming new models. These models are combined into a final decision through aggregate_hypos.
1 2 3 | constructive_aggregation(form, data, specs, lambda = 100, alpha = 30,
depth = NULL, aggregate_subsets = "simple",
aggregate_hypos = "simple")
|
form |
formula |
data |
training data |
specs |
object of class |
lambda |
smoothing window size |
alpha |
contiguity interval size |
depth |
depth size how large is the maximum size of the subsets. If NULL, defaults to no. of predictors minus one. |
aggregate_subsets |
aggregation approach for the set of subsets. |
aggregate_hypos |
final aggregation approach. How should the combined opinions be aggregated. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | specs <- model_specs(
learner = c("bm_svr", "bm_mars"),
learner_pars = list(
bm_glm = list(alpha = c(0, .5, 1)),
bm_svr = list(kernel = c("rbfdot"),
C = c(1, 3))
)
)
data("water_consumption")
waterc <- embed_timeseries(water_consumption, 5)
train <- waterc[1:300, ] # toy size for checks
test <- waterc[301:320, ] # toy size for checks
model <- constructive_aggregation(target ~., train, specs, 10,5,NULL,"window_loss","simple")
preds <- predict(model, test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.