May 2019
Intermediate to advanced
664 pages
15h 41m
English
Using the functionality of mlr again, we first need to create an object with our base learners. This is once again classif.randomForest and, for a MARS model, we call the earth package with classif.earth:
> base <- c("classif.randomForest", "classif.earth")
You now make a learner with those base learners, and then specify that you want the output of those learners as the predicted probability:
> learns <- lapply(base, makeLearner)> learns <- lapply(learns, setPredictType, "prob")
The process of building the base learning object is complete. I stated earlier that the ensembling learning algorithm will be GLM from glmnet. For just two base learners, a CART might be more appropriate, but let's demonstrate what's possible. ...