Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

fixed.acidity volatile.acidity citric.acid residual.sugar chlorides free.sulfur.dioxide total.sulfur.dioxide density pH sulphates alcohol quality_bin 1 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 0

fixed.acidity volatile.acidity citric.acid residual.sugar chlorides free.sulfur.dioxide total.sulfur.dioxide density pH sulphates alcohol quality_bin
1 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 0
2 7.8 0.88 0 2.6 0.098 25 67 0.9968 3.2 0.68 9.8 0
3 7.8 0.76 0.04 2.3 0.092 15 54 0.997 3.26 0.65 9.8 0
4 11.2 0.28 0.56 1.9 0.075 17 60 0.998 3.16 0.58 9.8 1
5 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 0
6 7.4 0.66 0 1.8 0.075 13 40 0.9978 3.51 0.56 9.4 0
7 7.9 0.6 0.06 1.6 0.069 15 59 0.9964 3.3 0.46 9.4 0
8 7.3 0.65 0 1.2 0.065 15 21 0.9946 3.39 0.47 10 1
9 7.8 0.58 0.02 2 0.073 9 18 0.9968 3.36 0.57 9.5 1
10 7.5 0.5 0.36 6.1 0.071 17 102 0.9978 3.35 0.8 10.5 0
11 6.7 0.58 0.08 1.8 0.097 15 65 0.9959 3.28 0.54 9.2 0
12 7.5 0.5 0.36 6.1 0.071 17 102 0.9978 3.35 0.8 10.5 0
13 5.6 0.615 0 1.6 0.089 16 59 0.9943 3.58 0.52 9.9 0
14 7.8 0.61 0.29 1.6 0.114 9 29 0.9974 3.26 1.56 9.1 0
15 8.9 0.62 0.18 3.8 0.176 52 145 0.9986 3.16 0.88 9.2 0
16 8.9 0.62 0.19 3.9 0.17 51 148 0.9986 3.17 0.93 9.2 0
17 8.5 0.28 0.56 1.8 0.092 35 103 0.9969 3.3 0.75 10.5 1
18 8.1 0.56 0.28 1.7 0.368 16 56 0.9968 3.11 1.28 9.3 0
19 7.4 0.59 0.08 4.4 0.086 6 29 0.9974 3.38 0.5 9 0
20 7.9 0.32 0.51 1.8 0.341 17 56 0.9969 3.04 1.08 9.2 1
21 8.9 0.22 0.48 1.8 0.077 29 60 0.9968 3.39 0.53 9.4 1
22 7.6 0.39 0.31 2.3 0.082 23 71 0.9982 3.52 0.65 9.7 0
23 7.9 0.43 0.21 1.6 0.106 10 37 0.9966 3.17 0.91 9.5 0
24 8.5 0.49 0.11 2.3 0.084 9 67 0.9968 3.17 0.53 9.4 0
25 6.9 0.4 0.14 2.4 0.085 21 40 0.9968 3.43 0.63 9.7 1
26 6.3 0.39 0.16 1.4 0.08 11 23 0.9955 3.34 0.56 9.3 0
27 7.6 0.41 0.24 1.8 0.08 4 11 0.9962 3.28 0.59 9.5 0
28 7.9 0.43 0.21 1.6 0.106 10 37 0.9966 3.17 0.91 9.5 0
29 7.1 0.71 0 1.9 0.08 14 35 0.9972 3.47 0.55 9.4 0
30 7.8 0.645 0 2 0.082 8 16 0.9964 3.38 0.59 9.8 1
31 6.7 0.675 0.07 2.4 0.089 17 82 0.9958 3.35 0.54 10.1 0
32 6.9 0.685 0 2.5 0.105 22 37 0.9966 3.46 0.57 10.6 1
33 8.3 0.655 0.12 2.3 0.083 15 113 0.9966 3.17 0.66 9.8 0
34 6.9 0.605 0.12 10.7 0.073 40 83 0.9993 3.45 0.52 9.4 1
35 5.2 0.32 0.25 1.8 0.103 13 50 0.9957 3.38 0.55 9.2 0
36 7.8 0.645 0 5.5 0.086 5 18 0.9986 3.4 0.55 9.6 1
37 7.8 0.6 0.14 2.4 0.086 3 15 0.9975 3.42 0.6 10.8 1
38 8.1 0.38 0.28 2.1 0.066 13 30 0.9968 3.23 0.73 9.7 1
39 5.7 1.13 0.09 1.5 0.172 7 19 0.994 3.5 0.48 9.8 0
40 7.3 0.45 0.36 5.9 0.074 12 87 0.9978 3.33 0.83 10.5 0

Compute in R Program using the above table:

Use the first half of the data to train a logistic regression model to make prediction for the independent variable "quality_bin", and then test on the second half of the training data. What is the classification error you obtain? What is the AUC of the testing? Make a ROC curve of it.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

College Algebra

Authors: Murray R Spiegel, Robert E Moyer

4th Edition

0071825851, 9780071825856

More Books

Students also viewed these Mathematics questions