get_risk_input: Create input list for 'get_risk'

Description Usage Arguments Value

Description

get_risk computes the cross-validated risk of the entire procedure by calling y_weight_control$cv_risk_fn with this input list.

Usage

1
2
get_risk_input(split_Y, Ynames, all_fits, V, learners, all_sl,
  all_fit_tasks, all_weight, sl_control)

Arguments

split_Y

The outcome matrix split by relevant validation folds.

Ynames

The names of the outcomes. Used to search all_fits and all_sl.

all_fits

List of all learner fits.

V

Number of folds.

learners

Vector of super learner vectors.

all_sl

List of all super learner weight fits.

all_fit_tasks

List of all learner fit tasks (faster to search over than search over all_fits).

all_weight

List of all outcome weight fits.

sl_control

List of super learner controls.

Value

List with each entry a list with entries: valid_fold (the number of the corresponding fold), Y (outcome matrix in this outer-most validation fold), pred (matrix of outcome predictions for this validation fold from super learner fit in V-1 training folds), and y_weight (vector of outcome weights computed by minimizing V-2 cross-validated risk of composite super learner). get_risk_input is only used to compute the cross-validated risk of composite super learner on the composite outcome and so is only used in the outer most cross-validation layer.


benkeser/cvma documentation built on May 5, 2019, 1:37 p.m.