The accompanying data set contains four predictor variables (x 1 to x 4 ) and one binary

Question:

The accompanying data set contains four predictor variables (x1 to x4) and one binary target variable (y). Follow the instructions below to create classification trees using the Exercise_10.10_Data worksheet. 

a. Use the rpart function to build a default classification tree. Display the default classification tree. How many leaf nodes are in the default classification tree? What are the predictor variable and split value for the first split of the default classification tree (root node)? 

b. Use the rpart function to build a fully-grown classification tree. Display the cp table. What is the cp value associated with the lowest cross-validation error? How many splits are in the minimum error tree? 

c. Is there a simpler tree within one standard error of the cross-validation error of the minimum error tree? If there is, then what is the cp value associated with the best-pruned tree? 

d. Use the prune function to prune the full tree to the best-pruned tree or minimum error tree if the answer to part c is “No.” Display the pruned tree. How many leaf nodes are in the pruned tree?

e. Assign Class 1 to be the positive class. What are the accuracy, sensitivity, specificity, and precision of the pruned tree on the validation data? 

f. Generate the decile-wise lift chart of the pruned tree on the validation data. What is the lift value of the leftmost bar of the decile-wise lift chart? What does this value imply? 

g. Generate the ROC curve of the pruned tree on the validation data. What is the area under the ROC curve (or AUC value)? 

h. Score the new observations in the Exercise_10.10_Score worksheet using the pruned tree. What is the predicted response value of the new observations? What is the Class 1 probability of the first observation? Round your answers to four decimal places.  

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Business Analytics Communicating With Numbers

ISBN: 9781260785005

1st Edition

Authors: Sanjiv Jaggia, Alison Kelly, Kevin Lertwachara, Leida Chen

Question Posted: