optim_risk_y_auc: Cross-validated area under the receiver operating...

Description Usage Arguments Value Examples

Description

In general, the function passed to y_weight_control$optim_risk should expect a named list of outcomes (Y) and predictions (pred) in validation folds and should return a criteria by which outcome weights may be optimized. The weights are input to the function via y_weight and are optimized in the y_weight_control$weight_fn. See Examples section below for an example of the format of the input list used for y_weight_control$optim_risk functions.

Usage

1
optim_risk_y_auc(y_weight, input, y_weight_control)

Arguments

y_weight

A numeric vector of weights corresponding to each outcome. Typically, this is what is maximized over in y_weight_control$weight_fn.

input

A list with named entries Y (matrix of outcomes for this validation fold) and pred (matrix of super learner predictions for each outcomes with columns corresponding to different outcomes).

y_weight_control

Composite outcome weight control options.

Value

Numeric value of cross-validated AUC.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Simulate data with proper format:
input <- list(Y = cbind(rbinom(50,1,0.5), rbinom(50,1,0.5), rbinom(50,1,0.5)), 
pred = cbind(runif(50,0,1), runif(50,0,1), runif(50,0,1)))

#Linear combination of outcomes:
y_weight_control <- list(ensemble_fn = "ensemble_linear")

#Example weights:
y_weight<-c(0,1,0)

#Get risk:
risk <- optim_risk_y_auc(y_weight, input, y_weight_control)

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