534 Delivering Business Intelligence with Microsoft SQL Server 2005
in the training data set. The other columns show the actual value for the number of
children at home for each customer.
In Figure 14-13, the top grid shows the result for the Decision Trees mining
model. Looking at the top row in the grid, we can see that in 805 cases, the Decision
Trees mining model predicted three children at home when there were actually
three children at home. These were correct predictions. In 109 cases, the Decision
Trees mining model predicted three children at home when there were actually four
children at home. These predictions were in error.
The diagonal of the grid shows the correct predictions: predicted three with
actual three, predicted two with actual two, predicted four with actual four, and so
on. We want to have the largest numbers along the diagonal. This is the case for the
Decision Trees mining model. We already know this model was accurate. The Naïve
Bayes mining model, shown in the middle grid in Figure 14-13, does not have the
largest numbers along the diagonal. This mining model had a tendency to predict
two children at home when there were actually four children at home. This mistake
occurred 994 times during the processing of our testing data set.
Mining Model Prediction
All this training and testing has ﬁ nally gotten us to a place where we have a mining
model ready to make real-world predictions. We have seen how each of the mining
models does at making predictions; now, we can pick one and put it to work. The
Mining Model Prediction tab enables us to do just that.
Using the Mining Model Prediction tab, we can create queries that use a mining
model to make predictions. Two types of prediction queries are supported: a
singleton query and a prediction join. We look at the singleton query ﬁ rst.
A Singleton Query
A singleton query lets us feed a single set of input values to the mining model. We
receive a single value for the predictable based on these values. This enables us to
manually enter a scenario to see what the mining model will predict.
Creating a Singleton Query
For both the singleton query and the prediction join, we must ﬁ rst select the mining
model to use. When the model is selected, the Singleton Query Input dialog box
contains an input ﬁ eld for each input column in the mining model. We can then enter
values for each of these input columns.
We then select the columns we would like in the result set. The predictable