variableSelection {MPAgenomics} | R Documentation |
This function selects the most relevant variables according to a response.
variableSelection(dataMatrix, dataResponse, nbFolds = min(length(dataResponse), 10), loss = c("logistic", "linear"), plot = TRUE, pkg = c("HDPenReg", "spikeslab"), ...)
dataMatrix |
Matrix containing the data, each row is a different sample. |
dataResponse |
response associated to the data. |
nbFolds |
number of folds in the cross validation. |
loss |
either "logistic" (binary response) or "linear" (quantitative response). |
plot |
If TRUE plot cross-validation mean squared error (default=TRUE). |
pkg |
Either "HDPenReg" or "spikeslab". Ued package in linear case. |
... |
spplementary arguments for cv.glmnet function in case of logistic loss or for HDlars or spikeslab function for linear loss. |
a list containing
A vector containing the index of all selected variables.
A vector containing the coefficients of all selected variables.
Intercept of the model.
Quentin Grimonprez