Categories: Uncategorized

Discussion Question

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

admin

Share
Published by
admin

Recent Posts

Childbirth

For this short paper activity, you will learn about the three delays model, which explains…

9 months ago

Literature

 This is a short essay that compares a common theme or motif in two works…

9 months ago

Hospital Adult Medical Surgical Collaboration Area

Topic : Hospital adult medical surgical collaboration area a. Current Menu Analysis (5 points/5%) Analyze…

9 months ago

Predictive and Qualitative Analysis Report

As a sales manager, you will use statistical methods to support actionable business decisions for Pastas R Us,…

9 months ago

Business Intelligence

Read the business intelligence articles: Getting to Know the World of Business Intelligence Business intelligence…

9 months ago

Alcohol Abuse

The behaviors of a population can put it at risk for specific health conditions. Studies…

9 months ago