0% found this document useful (0 votes)
24 views1 page

Assignment 7

Uploaded by

hsarpong15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

Assignment 7

Uploaded by

hsarpong15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment 7

Please show your work clearly to get full credit

1. In the lab, a classification tree was applied to the Carseats data set after
converting Sales into a qualitative response variable. Now we will seek to predict
Sales using regression trees and related approaches, treating the response as a
quantitative variable.

(a) Split the data set into a training set and a test set.

(b) Fit a regression tree to the training set. Plot the tree, and interpret the results.
What test MSE do you obtain?

(c) Use cross-validation in order to determine the optimal level of tree complexity.
Does pruning the tree improve the test MSE?

(d) Use the bagging approach in order to analyze this data. What test MSE do you
obtain? Use the importance() function to determine which variables are most
important.

e) Use random forests to analyze this data. What test MSE do you obtain? Use the
importance() function to determine which variables are most important.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy