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:10
Find the smallest number by which the given number should be divided to make a perfect cube(with steps or the answer will get reported) a.108 b.2187
Answers: 1
question
Mathematics, 21.06.2019 19:30
Complete the solution of the equation. find the value of y when x equals to 28 x+3y=28
Answers: 2
question
Mathematics, 21.06.2019 21:50
Question 14 (1 point) larry deposits $15 a week into a savings account. his balance in his savings account grows by a constant percent rate.
Answers: 3
question
Mathematics, 21.06.2019 23:00
The perimeter of a rectangular rug is 24 feet. the length of the rug is 1 2/5 i s width. what is the area of the rug
Answers: 2
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, 27.09.2019 17:30
Questions on the website: 13722367