78. mModelNames.put(iModelName, iActiveAttributes);
79. mCurrentState CampaignOptimizerState.ANALYZING;
The user can run the buildModel method several times, for example,
keeping only the demographic attributes, then keeping only the
behavioral data. This can be done by invoking the method described
earlier with different values for the iActiveAttributes argument. All
models successfully built are saved into a member variable of the
CampaignOptimizer object called mModelNames , which is a map asso-
ciating the name of the built model with the list of active attributes
used by this model. This list of model names will be used to select the
best model later. More complex scenarios could use specific algo-
rithm settings to create several decision trees with different settings.
The next step will be to select the best model based on the cost
structure, and associate this model with a specific threshold to decide
whether or not mail should be sent to a given customer. As in any
response model, the model predicts not only if the customer will
respond, but also a probability that a customer will respond. The
campaign manager must select a threshold probability such that cus-
tomers scoring above that threshold will receive the offer. To tune
this probability, we use the receiver operating characteristics (ROC)
curve returned by the TestMetrics task.
The ROC curve was discussed in Chapter 7. Table 12-1 provides
an example of data that is returned in the ROC object.
ROC Object—example data contents