SL.glmnet

## function (Y, X, newX, family, obsWeights, id, alpha = 1, nfolds = 10,
## nlambda = 100, useMin = TRUE, ...)
## {
## .SL.require("glmnet")
## if (!is.matrix(X)) {
## X <- model.matrix(~-1 + ., X)
## newX <- model.matrix(~-1 + ., newX)
## }
## fitCV <- glmnet::cv.glmnet(x = X, y = Y, weights = obsWeights,
## lambda = NULL, type.measure = "deviance", nfolds = nfolds,
## family = family$family, alpha = alpha, nlambda = nlambda)
## pred <- predict(fitCV$glmnet.fit, newx = newX, s = ifelse(useMin,
## fitCV$lambda.min, fitCV$lambda.1se), type = "response")
## fit <- list(object = fitCV, useMin = useMin)
## class(fit) <- "SL.glmnet"
## out <- list(pred = pred, fit = fit)
## return(out)
## }
## <environment: namespace:SuperLearner>