View source: R/buildEnsembleStack.R
buildEnsembleStack | R Documentation |
Generates an ensemble of surrogate models with stacking (stacked generalization).
buildEnsembleStack(x, y, control = list())
x |
design matrix (sample locations), rows for each sample, columns for each variable. |
y |
vector of observations at |
control |
(list), with the options for the model building procedure: |
returns an object of class ensembleStack
.
Loosely based on the code by Emanuele Olivetti https://github.com/emanuele/kaggle_pbr/blob/master/blend.py
Bartz-Beielstein, Thomas. Stacked Generalization of Surrogate Models-A Practical Approach. Technical Report 5/2016, TH Koeln, Koeln, 2016.
David H Wolpert. Stacked generalization. Neural Networks, 5(2):241-259, January 1992.
predict.ensembleStack
## Create design points x <- cbind(runif(20)*15-5,runif(20)*15) ## Compute observations at design points y <- funBranin(x) ## Create model with default settings fit <- buildEnsembleStack(x,y) ## Predict new point predict(fit,cbind(1,2)) ## True value at location funBranin(matrix( c(1,2), 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.