ensemble | R Documentation |
This function implements an ensemble learner with the possibility to extract the smoother matrix of linear smoothers.
ensemble(ml, x, y, xnew, nfolds = 5, weights = FALSE, quiet = TRUE)
ml |
List of methods build via |
x |
Covariate matrix of training sample. |
y |
Vector of outcomes of training sample. |
xnew |
Covariate matrix of test sample. |
nfolds |
Number of folds used in cross-validation of ensemble weights (default |
weights |
If TRUE, weights underlying the ensemble prediction for xnew calculated. |
quiet |
If FALSE, print method that is currently computed. |
Ensemble object containing:
ensemble |
the predictions of the trained ensemble for the test sample |
best |
the predictions of the best performing single method for the test sample |
fit_full |
matrix containing predictions of all considered methods |
weights |
If |
nnls_weights |
the weights that each method receives in the ensemble |
mse_cv |
cross-validated MSEs for each method |
fit_cv |
matrix containing the cross-validated predictions for each method |
@export
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.