Creating a bootstrap sample

A bootstrap sample is a random sample with replacement, meaning that each record has an equal chance of being selected; after it has been selected, that record has an equal chance of being selected again. Usually, when we select records for training and testing, we sample without replacement, so that each record will appear in only the training or the testing data set.

In this recipe we learn how to build bootstrap samples, a feature not included in Modeler.

Getting ready

This recipe uses the datafile cup98lrn_reduced_vars3.sav and the stream Recipe – bootstrap one sample.str.

How to do it...

To create a bootstrap sample:

  1. Open the stream Recipe – bootstrap one sample.str by navigating to File | Open Stream.
  2. Make sure the datafile ...

Get IBM SPSS Modeler Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.