ensemble_core: Core function of 'ensemble'.

View source: R/ensemble.R

ensemble_coreR Documentation

Core function of ensemble.

Description

Core function of ensemble.

Usage

ensemble_core(ml, x_tr, y_tr, x_te, weights = FALSE, quiet = TRUE)

Arguments

ml

List of methods build via create_method to be used in ensemble.

x_tr

Covariate matrix of training sample.

y_tr

Vector of outcomes of training sample.

x_te

Covariate matrix of test sample.

weights

If TRUE, weights underlying the ensemble prediction for x_te calculated.

quiet

If FALSE, print method that is currently computed.

Value

Returns list containing:

predictions

nrow(x_te) x length(ml) matrix with the predictions of each method

weights

If weights=TRUE, list of length(ml) with smoother matrices of dimension nrow(xnew) x nrow(x) containing the weights that deliver predictions of each method where each row gives the weight that each training outcome received in the prediction


MCKnaus/causalDML documentation built on Aug. 19, 2023, 5:47 p.m.