Create a regression tree using the accompanying data set in the Exercise_10.30_Data worksheet (predictor variables: x 1

Question:

Create a regression tree using the accompanying data set in the Exercise_10.30_Data worksheet (predictor variables: x1 to x4; target: y). 

a. Use the rpart function to build a default regression tree. Display the default regression tree. How many leaf nodes are in the default regression tree? 

b. What are the predictor variable and split value for the first split (root node) of the default regression tree? What are the rules that can be derived from the root node? 

c. Use the rpart function to build a fully-grown regression tree. Display the cp table. Which tree has the lowest cross-validation error? How many splits are in the minimum error tree? 

d. Is there a simpler tree with a cross-validation error that is within one standard error of the minimum cross-validation error? What is the cp value associated with the best-pruned tree? 

e. 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? 

f. What are the ME, RMSE, MAE, MPE and MAPE measures of the pruned tree on the validation data? 

g. Score the new observations in the Exercise_10.30_Score worksheet. What is the predicted value of y for the first observation? What are the minimum, maximum, and average values of predicted y?

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: