Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please use R to solve this question and include the R codes. I have found many solutions for this question but i do not know
please use R to solve this question and include the R codes.
I have found many solutions for this question but i do not know which is the correct one.
Use the 0.] data set which is part of the ISLE. package. (a) Create a training set containing a random sample of 80-0 observations, and a test set containing the remaining observations. (b) Fit a tree to the training data, which purchase as the response and the other variables except for Store as predictors. Use the summary\" function to produce summary statistics about the treeJ and describe the results obtained. 1What is the training error rate? HOW many terminal nodes does the tree have? (c) Create a plot of the treeJ and interpret the results. (d) Predict the response on the test data, and produce a confusion matrix comparing the test labels to predicted test labels. What is the test error rateStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started