powered by
EMlasso
cross validation function for EMlasso.
EMcvlasso( X, y, lambda = NULL, nbFolds = 10, maxSteps = 1000, intercept = TRUE, model = c("linear", "logistic"), burn = 30, threshold = 1e-08, eps = 1e-05, epsCG = 1e-08 )
A list containing
Mean prediction error for each value of index.
Standard error of lambda.
lambda
Minimal lambda criterion.
Values of lambda at which prediction error should be computed.
Value of lambda for which the cv criterion is minimal.
the matrix (of size n*p) of the covariates.
a vector of length n with the response.
Values at which prediction error should be computed.
the number of folds for the cross-validation.
Maximal number of steps for EM algorithm.
If TRUE, there is an intercept in the model.
"linear" or "logistic".
Number of steps for the burn period.
Zero tolerance. Coefficients under this value are set to zero.
Tolerance of the EM algorithm.
Epsilon for the convergence of the conjugate gradient.
Quentin Grimonprez, Serge Iovleff
dataset <- simul(50, 100, 0.4, 1, 10, matrix(c(0.1, 0.8, 0.02, 0.02), nrow = 2)) result <- EMcvlasso( X = dataset$data, y = dataset$response, lambda = 5:1, nbFolds = 5, intercept = FALSE )
Run the code above in your browser using DataLab