Many modeling algorithms in Modeler have Bagging and Boosting options already built-in. However, some models do not, including Logistic Regression. Even for these algorithms that do not have Bagging and Boosting, these model ensembles can help predictive accuracy significantly. In this recipe we learn how to build a bagged ensemble of logistic regression models from 10 bootstrap samples.
This recipe uses the datafile cup98lrn_reduced_vars3.sav
and the stream Recipe – bootstrap ensemble.str
.
To create bagged logistic regression models:
Open the stream
Recipe – bootstrap ensemble.str
by navigating to File | Open Stream.Make sure the datafile points to the correct path to
cup98lrn_reduced_vars3.sav
.Locate the supernode, Bootstrap Sample, select it with a left-click, and copy it by using Edit | Copy or by typing the shortcut Ctrl + C.
Paste the supernode to the stream by using Edit | Paste or by typing the shortcut Ctrl + V....