elasticNet: The elastic net (EN) function with multiple training run...

Description Usage Arguments Value Author(s)

View source: R/elasticNet.R

Description

Applies the elastic net regression algorithm to learn a sparse linear model for predicting a response vector from a set of input feature vectors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
elasticNet(
  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 = "",
  obsFractionForModelSelection = 0.75,
  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

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

obsFractionForModelSelection

The fraction of the number of observations. This is to limit the maximum possible number of predictors considered during model selection (default = 0.75).

verbose

a boolean, whether debugging information should be displayed

Value

a list with members:

Author(s)

Vinodh Rajapakse


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