[SOLVED] SDM Homework 1

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon HW1-y9ulxr.zip (466.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
đź”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

 

  1. 1)   Consider the Auto dataset in the ISLR package. Suppose that you are getting this data in order to build a predictive model for mpg (miles per gallon). Using the full dataset, investigate the data using exploratory data analysis such as scatterplots, and other tools we have discussed in class. Pre-process this data and justify your choices in your write up. Submit the cleaned dataset as an *.RData file.
  2. 2)  Perform a multiple regression on the dataset you pre-processed in question one. The response variable is mpg. Use the lm() function in R.
    a) Which predictors appear to have a significant relationship to the response.
    b) What does the coefficient variable for “year” suggest?

    c) Use the * and : symbols to fit models with interactions. Are there any interactions that are significant?

  3. 3)  ESL textbook exercise 2.8 modified: Compare the classification performance of linear regression and k-nearest neighbor classification on the zipcode data. In particular, consider only the 2’s and 3’s for this problem, and k = 1,3,5,7,9,11, 13,15. Show both the training and the test error for each choice of k. The zipcode data is available in the ElemStatLearn package. Note that you do not have to divide the data into test and training as it is done for you.

    > ls(“package:ElemStatLearn”) >?zip.test
    >?zip.train

  4. 4)  ISL textbook exercise 2.10 modified: This exercise concerns the boston housing data in the MASS library (>library(MASS) >data(Boston)).
    1. a)  Make pairwise scatterplots of the predictors, and describe your findings.
    2. b)  Are any of the predictors associated with per capita crime rate?
    3. c)  Do any of the suburbs of Boston appear to have particularly high crime rates? Tax rates? Pupil-teacher ratios? Comment on the range of each predictor.
    4. d)  In this data set, how many of the suburbs average more than seen rooms per dwelling? More than eight rooms per dwelling? Comment on the suburbs that average more than eight rooms per dwelling.
  • HW1-y9ulxr.zip