CVWeightedBootstrap: CVWeightedBootstrap

Description Usage Arguments Value

View source: R/CVWeightedBootstrap.R

Description

Runs a K-fold cross-validation with weighted bootstrap to approximate training/testing error from an annotated dataset

Usage

1
2
CVWeightedBootstrap(feature.mat, k_fold = 5, boot_samples = 100, pz,
  stratify_var = quo(Z), Y = "Y", model = "lasso")

Arguments

feature.mat

Data frame containing features and labels

k_fold

Number of folds for cross validation

boot_samples

Number of weighted bootstrap samples for validation

pz

Prevalence of surrogate positives in the cohort i.e. P(Z=1)

stratify_var

Surrogate name in quo(.)

Y

Column name of the binary outcome

model

Whether to use a glm, lasso, or ridge model

Value

A data frame with k_fold rows, where each row has the AUC's obtained from training, validation (naive, no reweighting), as well as the mean and variance of the weighted bootstrap resampling


wlktan/surrogateSampling documentation built on May 23, 2019, 3:07 p.m.