parse_alphalist: parse_alphalist

View source: R/dCVnet_utilities.R

parse_alphalistR Documentation

parse_alphalist

Description

Check / standardise a numeric vector of alpha values for a multi-alpha glmnet model.

Usage

parse_alphalist(alphalist, stripNA = FALSE, dedupe = FALSE)

Arguments

alphalist

a numeric of alpha values.

stripNA

missing values either throw an error or are discarded.

dedupe

duplicate alpha values either throw an error or are discarded.

Details

  • Very small alphas are typically slow to fit.

  • At last time of testing alpha=0.0 (i.e. a pure L2 / ridge penalty) did not work due to a bug related to using fixed folds in glmnet. As a workaround Zeros are replaced with a small non-zero value. In effect different software is required to get results for a 'pure' L2/ridge regression model.

Value

a named numeric vector of, de-duplicated, alpha values between (0, 1] - i.e. excluding zero.


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