lambda_rangefinder: lambda_rangefinder

View source: R/dCVnet_utilities.R

lambda_rangefinderR Documentation

lambda_rangefinder

Description

What range of lambda penalty amounts should we consider for a dataset? The maximum for a given dataset is determined by a simple formula, but this can vary from subset to subset. This code bootstraps the calculation of max-lambda for subsets of the input data.

Usage

lambda_rangefinder(y, x, alphalist, prop, niter = 10000)

Arguments

y

binary outcome (from parse_dCVnet_input)

x

predictor matrix (from parse_dCVnet_input)

alphalist

alphas to consider, e.g. c(0.2, 0.5, 0.8)

prop

proportion of the input to bootstrap. This should be the fraction of observations remaining in the inner loop CV. for example: if outer and inner loops are both 5-fold, prop should be 0.8 * 0.8 = 0.64

niter

the number of times to bootstrap.

Value

maxlambda - the largest bootstrapped lambda value for each alpha requested.


AndrewLawrence/dCVnet documentation built on Sept. 24, 2024, 5:24 a.m.