selectElasticNetParams: Select the optimal elastic net parameters based on...

Description Usage Arguments Value

View source: R/selectElasticNetParams.R

Description

Select the optimal elastic net parameters based on cross-validation error estimates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
selectElasticNetParams(
  featureMat,
  responseVec,
  standardize = TRUE,
  standardizeY = FALSE,
  fitIntercept = TRUE,
  alphaVals = seq(0.2, 1, length = 9),
  lambdaVals = NULL,
  nFolds = 10,
  nRepeats = 10,
  useLambdaMin = TRUE,
  verbose = TRUE
)

Arguments

featureMat

p x n matrix with input feature vectors along rows.

responseVec

n-dimensional response vector to be predicted using a sparse linear combination of input feature vectors specified in featureMat.

standardize

Logical flag for feature variable standardization (across observations), passed in to glmnet functions (glmnet documentation: if variables are already in the same units, standardization may not be necessary).

standardizeY

Logical flag for response variable standardization across observations.

fitIntercept

Logical flag indicating whether intercept term should be fit.

alphaVals

a vector of alpha values to be optimized over

lambdaVals

a vector of lambda values to be optimized over

nFolds

The number of folds used in cross-validation.

nRepeats

The number of cross-validation repeats (with different fold assignments).

useLambdaMin

a boolean, whether to use the minimum lambda (lambda.min) from cross-validation as the optimum lambda, if FALSE then the largest value of lambda such that error is within 1 standard error of the minimum (lambda.1se) is used.

Value

A list with the following elements:


CBIIT/rcellminerElasticNet documentation built on Sept. 8, 2020, 6:21 p.m.