subject
Mathematics, 27.11.2019 01:31 emiliestinnett

In this problem, you will develop a model to predict whether a given car gets high or low gas mileage based on the auto data set.

(a) create a binary variable, mpg01, that contains a 1 if mpg contains a value above its median, and a 0 if mpg contains a value below its median. you can compute the median using the median() function. note you may find it to use the data. frame() function to create a single data set containing both mpg01 and the other auto variables. 4. classification

(b) explore the data graphically in order to investigate the associ- ation between mpg01 and the other features. which of the other features seem most likely to be useful in predicting mpg01? scat- terplots and boxplots may be useful tools to answer this ques- tion. describe your findings.

(c) split the data into a training set and a test set .

(d) perform lda on the training data in order to predict mpg01 using the variables that seemed most associated with mpg01 in (b). what is the test error of the model obtained?

(e) perform qda on the training data in order to predict mpg01 using the variables that seemed most associated with mpg01 in (b). what is the test error of the model obtained?

(f) perform logistic regression on the training data in order to pre- dict mpg01 using the variables that seemed most associated with mpg01 in (b). what is the test error of the model obtained?

(g) perform knn on the training data, with several values of k, in order to predict mpg01. use only the variables that seemed most associated with mpg01 in (b). what test errors do you obtain? which value of k seems to perform the best on this data set?

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 18:00
Sara can take no more than 22 pounds of luggage on a trip.her suitcase weighs 112 ounces.how many more pounds can she pack without going over the limit?
Answers: 1
question
Mathematics, 21.06.2019 23:00
What are two numbers that add up to -9 and multiply to -10 best answer gets branliest and 100 extra points
Answers: 1
question
Mathematics, 22.06.2019 02:30
Build is 120 wide 20 feet high 48 feet long how many cubic feet and the volume
Answers: 1
question
Mathematics, 22.06.2019 04:20
If the class creates a histogram of the data in table, how many students are in the range 12cm to 13.9 cm
Answers: 1
You know the right answer?
In this problem, you will develop a model to predict whether a given car gets high or low gas mileag...
Questions
question
Mathematics, 05.05.2021 19:20
question
Mathematics, 05.05.2021 19:20
question
Mathematics, 05.05.2021 19:20
Questions on the website: 13722367