Refer to the previous exercise for a description of the problem and data set. Build a default
Question:
Refer to the previous exercise for a description of the problem and data set. Build a default classification tree to predict whether an individual is likely to attend church. Display the default classification tree.
a. How many leaf nodes are in the tree? What are the predictor variable and the split value for the first split of the default classification tree? What are the rules that can be derived from the root node?
b. Build a full-grown tree. Which cp value is associated with the lowest cross-validation error?
c. Is there a simpler tree with a cross-validation error that is within one standard error of the minimum cross validation error? If there is, then which cp value is associated with the best-pruned tree? How many splits are in the best-pruned tree?
d. Prune the full tree to the best-pruned tree or the minimum error tree if the answer to part c is “No.” Create a confusion matrix and display the various performance measures. Assign Class 1 to be the positive class. What are the accuracy, sensitivity, specificity, and precision of the pruned tree on the validation data?
e. Display the cumulative lift chart, the decile-wise lift chart, and the ROC curve of the minimum error tree on the validation data. Comment on the performance of the classification tree.
f. Score the cases in the Church_Score worksheet using the best-pruned tree. What percentage of the individuals in the score data set are likely to go to church based on a cutoff probability value of 0.5?
Data from Exercises 15
The following data set in the Church_ Data worksheet is used to classify individuals as likely or unlikely to attend church using five predictor variables: years of education (Educ), annual income (Income in $), age, sex (F = female, M = male), and marital status (Married, Y = yes, N = no). The outcome variable is Church (1 = attends, 0 otherwise). Create a classification tree model for predicting whether the individual is likely to attend church. Select the best-pruned tree for scoring and display the full-grown, best-pruned, and minimum error trees.
Step by Step Answer:
Business Analytics Communicating With Numbers
ISBN: 9781260785005
1st Edition
Authors: Sanjiv Jaggia, Alison Kelly, Kevin Lertwachara, Leida Chen