cvElasticNet: Cross validate the entire elastic net procedure to obtain a...

Description Usage Arguments Value

View source: R/cvElasticNet.R

Description

Cross validate the entire elastic net procedure to obtain a set of predicted response values for strictly held out data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cvElasticNet(
  nFolds = 10,
  nRepeats = 10,
  cvFoldIds = NULL,
  minFeatureResponseAbsCor = 0,
  featureMat,
  responseVec,
  standardize = TRUE,
  standardizeY = FALSE,
  fitIntercept = TRUE,
  alphaVals = seq(0.2, 1, length = 9),
  lambdaVals = NULL,
  nFoldsForParamSelection = 10,
  nCvRepeats = 10,
  nTrainingRuns = 200,
  minFeatureFrequencyPctl = 0.95,
  cumCorNumPredictors = 10,
  useLambdaMin = TRUE,
  useOneStdErrRule = FALSE,
  id = "",
  keepEnResults = FALSE,
  useModelYIntercept = FALSE,
  verbose = TRUE
)

Arguments

nFolds

The number of folds used in cross-validation.

nRepeats

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

cvFoldIds

An nObs x nReplicates matrix with integer fold identifiers along the columns.

minFeatureResponseAbsCor

Minimum absolute correlation between feature and response (used to filter rows of featureMat).

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

nFoldsForParamSelection

the number of cross-validation folds to perform

nTrainingRuns

number of training runs to perform

minFeatureFrequencyPctl

a fractional value (0-1). Features in the x percentile defined by this parameter after the removal of features with zero weights are retained.

cumCorNumPredictors

the maximum number of predictors to be returned

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.

useOneStdErrRule

Use one standard error rule for model selection, i.e., select smallest model (in terms of number of predictors) for which the estimated error (by cross-validation) is within one standard error of the minimum estimated error.

id

a optional string identifier for the EN run

useModelYIntercept

A logical value indicating if the model intercept term should be used for prediction of response values held out in each CV fold.

verbose

a boolean, whether debugging information should be displayed

Value

A list with the following elements


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