Description Usage Arguments Value
View source: R/selectElasticNetParams.R
Select the optimal elastic net parameters based on cross-validation error estimates.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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. |
A list with the following elements:
alpha The optimal alpha parameter.
lambda The optimal lambda parameter.
minCvError The minimum average cross validation error.
cvInfoTab A data frame summarizing minimum cross validation errors and lambda parameter selections for each possible choice of the alpha parameter.
cvFoldIds A matrix indicating the fold ids for each cross validation repeat along the columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.