cvr.glmnet {ipflasso} | R Documentation |
Repeating cv.glmnet
Description
the same as cv.glmnet but with several ncv repetitions of CV: cross-validation repeated ncv times (i.e. for ncv different random partitions)
Usage
cvr.glmnet(X, Y, family, standardize=TRUE,alpha=1, nfolds, ncv, type.measure,...)
Arguments
X |
a (nxp) matrix of predictors with observations in rows and predictors in columns |
Y |
n-vector giving the value of the response (either continuous, numeric-binary 0/1, or |
family |
should be "gaussian" for continuous |
standardize |
whether the predictors should be standardized or not. Default is TRUE. |
alpha |
the elastic net mixing parameter: |
nfolds |
the number of folds of CV procedure. |
ncv |
the number of repetitions of CV. Not to be confused with |
type.measure |
The accuracy/error measure computed in cross-validation. If not specified, type.measure is "class" (classification error) if |
... |
Other arguments to be passed to the function |
Value
A list with the following arguments:
coeff |
the matrix of coefficients with predictors corresponding to rows and lambda values corresponding to columns. The first rows contains the intercept of the model (for all families other than |
lambda |
the lambda sequence |
cvm |
the CV estimate of the measure specified by |
Author(s)
Anne-Laure Boulesteix (https://www.en.ibe.med.uni-muenchen.de/mitarbeiter/professoren/boulesteix/index.html)
References
Boulesteix AL, De Bin R, Jiang X, Fuchs M, 2017. IPF-lasso: integrative L1-penalized regression with penalty factors for prediction based on multi-omics data. Comput Math Methods Med 2017:7691937.
Examples
# load ipflasso library
library(ipflasso)
# generate dummy data
X<-matrix(rnorm(50*200),50,200)
Y<-rbinom(50,1,0.5)
cvr.glmnet(X=X,Y=Y,family="binomial",standardize=FALSE,nfolds=5,ncv=10,type.measure="class")