if (FALSE) {
# Load a test dataset.
data(PimaIndiansDiabetes2, package = "mlbench")
data = PimaIndiansDiabetes2
# Omit observations with missing data.
data = na.omit(data)
Y = as.numeric(data$diabetes == "pos")
X = subset(data, select = -diabetes)
set.seed(1, "L'Ecuyer-CMRG")
sl = SuperLearner(Y, X, family = binomial(),
SL.library = c("SL.mean", "SL.glm", "SL.glmnet"))
sl
}
Run the code above in your browser using DataLab