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

Question:

Create a regression tree using the accompanying data set in the Exercise_10.31 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? What are the predictor variable and split value for the first split of the default regression tree?

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

c. 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? How many splits are in the best-pruned tree? 

d. 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. What are the ME, RMSE, MAE, MPE, and MAPE measures of the pruned tree on the validation data? e. Comment on the performance of the pruned regression tree.  

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: