Problem 2 In this problem, you will develop a model to predict w
Problem 2 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 that you may find it helpful to use the data.frame( ) function to create a single data set containing both mpg01 and the other Auto variables. (b) Explore the data graphically in order to investigate the association between mpg01 and the other features. Which of the other features seem most likely to be useful in predicting mpg01? Scatterplots and Boxplots may be useful tools to answer this question. Describe your findings. (c) Split the data into a training set and a test set. (d) Perform logistic regression 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) Repeat 2.d for KNN. Use different values for K and analyze the results. (f) Develop QDA based classifier for 2.d. Compute the confusion matrix. (g) Determine the sensitivity, specificity, accuracy, error rate, and false positive rates for classifier in Problem 2 Use: (i) Threshold of 0.5 for high mileage cars (ii) Threshold of 0.4 for high mileage cars (iii) Interpret the results in (i) and (ii) (h) Generate the ROC curve and determine the AUC for classifier in Problem 2
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.