get_y_weight_input: Create input list for 'get_y_weight'

Description Usage Arguments Value

Description

Create input list for get_y_weight

Usage

1
2
get_y_weight_input(split_Y, Ynames, valid_folds, all_fits, all_sl,
  all_fit_tasks, sl_control, V, learners)

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.

valid_folds

If not NULL, identifies validation folds used in the inner most super learner. Set to NULL when getting weights for outer cross-validation folds (where all folds are used for training super learner).

all_fits

List of all learner fits.

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).

sl_control

List of super learner controls.

V

Number of folds.

learners

Vector of super learner vectors.

Value

List with each entry a list with entries: valid_fold (the number of the corresponding fold), Y (the outcome matrix in this validation fold), pred (matrix of outcome predictions for this validation fold from the super learner fit in training folds). The length of the list varies according to what is input into valid_folds so that this function may be used both in the outer and inner layers of cross-validation.


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