Question: I need help with the following exercise on R 2. (1.5 pts.) This question involves the Default data set from the ISLR package. (a) Split

I need help with the following exercise on R

I need help with the following exercise on R 2. (1.5 pts.)

2. (1.5 pts.) This question involves the Default data set from the ISLR package. (a) Split the sample set into a training set and a validation set (set a seed equal to your NIU). (b) Fit a tree to the training data, with default as the response and the other variables as predictors. What is the training error rate? How many terminal nodes does the tree have? (c) Create a plot of the tree. (d) Type in the name of the tree object in order to get a detailed text output. Pick one of the terminal nodes, and interpret the information displayed for that node

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 Mathematics Questions!