Building the Stream

  1. Add a Statistics File source node pointing to telco_Jan.sav in the Demos folder.
    Figure 1. Bayesian Network sample stream
    Bayesian Network sample stream

    Previous analysis has shown you that several data fields are of little importance when predicting churn. These fields can be filtered from your data set to increase the speed of processing when you are building and scoring models.

  2. Add a Filter node to the Source node.
  3. Exclude all fields except address, age, churn, custcat, ed, employ, gender, marital, reside, retire, and tenure.
  4. Click OK.
    Figure 2. Filtering unnecessary fields
    Filtering unnecessary fields
  5. Add a Type node to the Filter node.
  6. Open the Type node and click the Read Values button to populate the Values column.
  7. In order that the Evaluation node can assess which value is true and which is false, set the measurement level for the churn field to Flag, and set its role to Target. Click OK.
    Figure 3. Selecting the target field
    Selecting the target field

    You can build several different types of Bayesian networks; however, for this example you are going to build a Tree Augmented Naïve Bayes (TAN) model. This creates a large network and ensures that you have included all possible links between data variables, thereby building a robust initial model.

  8. Attach a Bayesian Network node to the Type node.
  9. On the Model tab, for Model name, select Custom and enter Jan in the text box.
  10. For Parameter learning method, select Bayes adjustment for small cell counts.
  11. Click Run. The model nugget is added to the stream, and also to the Models palette in the upper-right corner.
    Figure 4. Creating a Tree Augmented Naïve Bayes model
    Creating a Tree Augmented Naïve Bayes model
  12. Add a Statistics File source node pointing to telco_Feb.sav in the Demos folder.
  13. Attach this new source node to the Filter node (on the warning dialog, choose Replace to replace the connection to the previous source node).
    Figure 5. Adding the second month's data
    Adding the second month's data
  14. On the Model tab of the Bayesian Network node, for Model name, select Custom and enter Jan-Feb in the text box.
  15. Select Continue training existing model.
  16. Click Run. The model nugget overwrites the existing one in the stream, but is also added to the Models palette in the upper-right corner.
Figure 6. Retraining the model
Retraining the model

Next