Question: Question 3 : Load the rpart library into your R environment ( rpart contains the tree function necessary for fitting CART models ) . Partition

Question 3: Load the rpart library into your R environment (rpart contains the tree function necessary for fitting CART models). Partition the data set into training (60%) and testing (40%) sets. Build a single classification tree with the training data and HighVol as the target. (Hint: Be sure to exclude the Sales variable from the model since it was used to create our outcome variable.)1.Which variable(s) were used in the tree model?2.How would you use the model to predict whether or not a store would produce a high volume?3.What is the accuracy of the model when using the training and test data? Use the function confusionMatrix to create a misclassification table to include with your answer.4.Consider the following store: ShelvLoc = Good, Price =115, no local advertising budget, and local income of $46,000. Based on the classification model, would a store with those features be predicted to be a high-performing store? Explain your answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!