Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using R and the following MPG dataset un m nnnnnn B C D E F G H 1 mpg cylinders displacement horsepower weight acceleration model_year
Using R and the following MPG dataset
un m nnnnnn B C D E F G H 1 mpg cylinders displacement horsepower weight acceleration model_year origin 2 1 18 8 307 130 3504 12 70 3 2 15 8 350 165 3693 11.5 70 4 3 16 8 304 150 3433 12 70 5 4 15 8 429 198 4341 10 70 6 5 14 8 440 215 4312 8.5 7 6 15 8 390 190 3850 8.5 8 7 15 8 383 170 3563 10 9 8 14 8 340 160 3609 8 10 9 15 8 400 150 3761 9.5 11 10 14 8 455 225 3086 10 12 11 24 4 113 95 2372 15 70 13 12 4 97 46 1835 20.5 70 14 13 4 107 90 2430 14.5 70 15 14 28 4 140 90 2264 15.5 71 16 15 16 6 225 105 3439 15.5 71 17 16 17 6 250 100 3329 15.5 71 18 17 19 6 250 88 3302 15.5 71 19 18 14 8 400 175 4464 11.5 71 20 19 14 8 351 153 4154 13.5 71 21 20 14 8 318 150 4096 13 71 22 21 12 8 383 180 4955 11.5 71 23 22 13 8 400 170 4746 12 71 24 23 13 8 400 175 5140 12 71 25 24 18 6 258 110 2962 13.5 71 26 25 22 4 140 72 2408 19 71 27 26 23 4 122 86 2220 14 71 28 27 31 4 71 65 1773 19 71 29 28 27 4 97 60 1834 19 71 30 29 24 4 113 95 2278 15.5 72 31 30 25 4 97.5 80 2126 17 72 32 31 23 4 97 54 2254 23.5 72 33 32 21 4 122 86 2226 16.5 72 34 33 15 8 318 150 4135 13.5 72 35 34 14 8 351 153 4129 13 72 36 35 17 8 304 150 3672 11.5 72 37 36 13 8 350 155 4502 13.5 72 38 37 12 8 350 160 4456 13.5 72 39 38 13 8 400 190 4422 12.5 72 40 39 19 3 70 97 2330 13.5 72 41 40 15 8 304 150 3892 12.5 72 42 41 13 8 307 130 4098 14 72 43 42 13 8 302 140 4294 16 72 44 43 14 8 318 150 4077 14 72 45 44 18 121 112 2933 14.5 72 46 45 22 4 121 76 2511 18 72 L car name NA NA 1 "chevrolet chevelle malibu" 1 "buick skylark 320" 1 "amc rebel sst" 1 "ford galaxie 500" 1 "plymouth fury iii" 1 "amc ambassador dpi" 1 "dodge challenger se" 1 "plymouth 'cuda 340" 1 "chevrolet monte carlo" 1 "buick estate wagon 3 "toyota corona mark 2 "volkswagen 1131 deluxe 2 "audi 100 IS" 1 "chevrolet vega 2300" 1 "plymouth satellite custom" 1 "chevrolet chevelle malibu" 1 "ford torino 500" 1 "pontiac catalina brougham" 1 "ford galaxie 500" 1 "plymouth fury 1 "dodge monaco (sw)" 1 "ford country squire 1 "pontiac safari (sw)" 1 "amc hornet sportabout 1 "chevrolet vega (sw)" 1 "mercury capri 2000" 3 "toyota corolla 1200" 2 "volkswagen model 111" 3 "toyota corona hardtop" 1 "dodge colt hardtop" 2 "volkswagen type 3" 1 "ford pinto runabout" 1 "plymouth fury 1 "ford galaxie 500" 1 "amc ambassador sst" 1 "buick lesabre custom" 1 "oldsmobile delta 88 1 "chrysler newport royal" 3 "mazda x2 coupe" 1 "amc matador (sw)" 1 "chevrolet chevelle concours 1 "ford gran torino 1 "plymouth satellite custom 2 "volvo 145e (sw)" 2 "volkswagen 411 (sw)" nnnnnn2222222222 100 44 A H1 fury 440 V6" 1 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 D E F G mpg cylinders displacement horsepower weight acceleration model_year origin 46 21 4 120 87 2979 19.5 72 47 26 4 96 69 2189 18 72 48 22 4 122 86 2395 16 72 49 28 4 97 92 2288 17 72 50 23 4 120 97 2506 14.5 72 51 28 4 98 80 2164 15 72 52 27 4 97 88 2100 16.5 72 53 13 8 350 175 4100 13 73 54 14 8 302 137 4042 14.5 73 55 15 8 318 150 3777 12.5 73 56 12 8 429 198 4952 11.5 73 57 13 8 400 150 4464 12 73 58 14 8 318 150 4237 14.5 73 59 13 8 215 4735 11 73 60 12 8 455 225 4951 11 73 61 13 8 360 175 3821 11 73 62 16 6 250 100 3278 18 73 63 26 4 97 46 1950 21 73 64 13 8 360 170 4654 13 73 65 12 8 350 180 4499 12.5 73 66 21 6 155 107 2472 14 73 67 26 4 98 90 2265 15.5 73 68 15 350 145 4082 13 73 69 16 400 230 4278 9.5 73 70 15 8 318 150 3399 11 73 71 20 6 156 122 2807 13.5 73 72 32 4 71 65 1836 21 74 73 16 6 250 100 3781 17 74 74 18 6 225 105 3613 16.5 74 75 16 8 302 140 4141 14 74 76 13 8 350 150 4699 14.5 77 14 8 318 150 4457 13.5 78 14 8 302 140 4638 16 79 14 8 304 150 4257 15.5 80 26 4 116 75 2246 14 81 19 6 225 95 3264 16 75 82 15 8 350 145 4440 14 83 16 8 318 150 4498 14.5 75 84 16 6 250 105 3897 18.5 75 85 20 8 262 110 3221 13.5 86 13 8 302 129 3169 12 75 87 33 4 91 53 1795 17.5 75 88 17.5 8 305 4215 13 76 89 16 8 318 150 4190 13 76 90 14.5 8 351 4215 12.8 76 L car name NA NA 2 "peugeot 504 (sw)" 2 "renault 12 (sw)" 1 "ford pinto (sw)" 3 "datsun 510 (sw)" 3 "toyouta corona mark 1 "dodge colt (sw)" 3 "toyota corolla 1600 1 "buick century 350" 1 "ford gran torino" 1 "dodge coronet custom" 1 "mercury marquis brougham" 1 "chevrolet caprice classic" 1 "plymouth gran 1 "chrysler new yorker 1 "buick electra 225 1 "amc ambassador brougham" 1 "chevrolet nova custom" 2 "volkswagen super beetle" 1 "plymouth custom suburb" 1 "oldsmobile vista cruiser" 1 "mercury capri 2 "fiat 124 sport 1 "chevrolet monte carlo 1 "pontiac grand prix" 1 "dodge dart custom" 3 "toyota mark ii" 3 "toyota corolla 1200" 1 "chevrolet chevelle malibu 1 "plymouth satellite sebring" 1 "ford gran torino" 1 "buick century luxus 1 "dodge coronet custom 1 "ford gran torino 1 "amc matador (sw)" 2 "fiat 124 tc" 1 "plymouth valiant custom" 1 "chevrolet bel air" 1 "plymouth grand fury" 1 "chevroelt chevelle malibu" 1 "chevrolet monza 2+2" 1 "ford mustang ii" 3 "honda civic CMCc" 1 "chevrolet chevelle malibu 1 "dodge coronet brougham" 1 "ford gran torino" 0 00 00 00 140 152 : oooo 1 L NA se" ghia" sj" d/i" premier ii" VCC" isuzu 5 gti" ES A D E F G H 1 1 mpg cylinders displacement horsepower weight acceleration model_year origin 92 91 20 6 225 100 3651 17.7 76 93 92 18 6 250 78 3574 21 76 94 93 18.5 6 250 110 3645 16.2 76 95 94 17.5 6 258 95 3193 17.8 76 96 95 13 8 318 150 3940 13.2 76 97 96 19 6 156 108 2930 15.5 76 98 97 31.5 4 98 68 2045 18.5 77 99 98 30 4 111 80 2155 14.8 77 100 99 36 4 79 58 1825 18.6 77 101 100 25.5 4 122 96 2300 15.5 77 102 101 33.5 4 85 70 1945 16.8 77 103 102 17.5 8 305 145 3880 12.5 77 104 103 17 8 260 110 4060 19 77 105 104 15.5 8 318 145 4140 13.7 77 106 105 15 8 302 130 4295 14.9 77 107 106 19 6 225 100 3630 17.7 77 108 107 16 8 400 180 4220 11.1 77 109 108 15.5 8 350 170 4165 11.4 77 110 109 29 4 97 78 1940 14.5 77 111 110 24.5 4 151 88 2740 16 77 112 111 26 4 97 75 2265 18.2 77 113 112 25.5 4 140 89 2755 15.8 77 114 113 33.5 4 98 83 2075 15.9 77 115 114 43.1 4 90 48 1985 21.5 78 116 115 32.8 4 78 52 1985 19.4 78 117 116 39.4 4 85 70 2070 18.6 78 118 117 36.1 4 91 60 1800 16.4 78 119 118 19.9 8 260 110 3365 15.5 78 120 119 20.2 8 302 139 3570 12.8 78 121 120 19.2 6 231 105 3535 19.2 78 122 121 20.2 6 200 85 2965 15.8 78 123 122 25.1 4 140 88 2720 15.4 78 124 123 20.6 6 231 105 3380 15.8 78 125 124 18.1 6 258 120 3410 15.1 78 126 125 19.2 8 305 145 3425 13.2 78 127 126 17.7 6 231 165 3445 13.4 78 128 127 17.5 8 318 140 4080 13.7 78 129 128 21.1 4 134 95 2515 14.8 78 130 129 23.8 4 151 85 2855 17.6 78 131 130 29.5 4 98 68 2135 16.6 78 132 131 21.5 6 231 115 3245 15.4 79 133 132 19.8 6 200 85 2990 18.2 79 134 133 22.3 4 140 88 2890 17.3 135 134 20.2 6 232 90 3265 18.2 136 135 20.6 6 225 110 3360 16.6 J K car name NA 1 "dodge aspen 1 "ford granada 1 "pontiac ventura 1 "amc pacer 1 "plymouth volare 3 "toyota mark 3 "honda accord 1 "buick opel 2 "renault 1 "plymouth arrow 3 "datsun f-10 1 "chevrolet caprice 1 "oldsmobile cutlass 1 "dodge monaco 1 "mercury cougar 1 "plymouth volare 1 "pontiac grand 1 "chevrolet monte 2 "volkswagen rabbit 1 "pontiac sunbird 3 "toyota corolla 1 "ford mustang 1 "dodge colt 2 "volkswagen rabbit 3 "mazda glc 3 "datsun b210 3 "honda civic 1 "oldsmobile cutlass 1 "mercury monarch 1 "pontiac phoenix 1 "ford fairmont 1 "ford fairmont 1 "buick century 1 "amc concord 1 "chevrolet monte 1 "buick regal 1 "dodge magnum 3 "toyota celica 1 "oldsmobile starfire 3 "honda accord 1 "pontiac lemans 1 "mercury zephyr 1 "ford fairmont 1 "amc concord 1 "dodge aspen hatchback" classic" supreme" brougham" brougham" custom" prix carlo custom" coupe" liftback" ii m/m" custom deluxe" ooooooooooooo 00 00 CVCC" salon ghia" lj" (auto)" (man)" special" d/I" carlo sport xe" gt SX" V6" 6" 4" dl 6" 00 00 00 00 00 st. regis" wma A B C D E F G H 1 1 mpg cylinders displacement horsepower weight acceleration model_year origin 137 136 17 8 305 130 3840 15.4 138 137 17.6 302 129 3725 13.4 139 138 16.5 351 138 3955 13.2 79 140 139 18,2 318 135 3830 15.2 141 140 16.9 350 155 4360 14.9 142 141 15.5 8 351 142 4054 14.3 143 142 19.2 8 267 125 3605 15 144 143 18.5 8 360 150 3940 13 145 144 31.9 4 89 71 1925 14 146 145 34.1 4 86 65 1975 15.2 147 146 35.7 4 98 80 1915 14.4 148 147 27.4 4 121 80 2670 15 149 148 25.4 5 183 77 3530 20.1 150 149 23.9 8 260 90 3420 22.2 151 150 34.5 4 105 70 2150 14.9 152 151 37.3 4 91 69 2130 14.7 153 152 28.4 4 151 90 2670 16 154 153 26.8 6 173 115 2700 12.9 155 154 38.1 4 89 60 1968 18.8 156 155 29.8 4 134 90 2711 15.5 157 156 37 4 119 92 2434 15 80 158 157 44.3 4 90 48 2085 21.7 159 158 43.4 4 90 48 2335 23.7 80 160 159 36.4 5 121 67 2950 19.9 80 161 160 44.6 4 91 67 1850 13.8 80 162 161 23.7 3 70 100 2420 12.5 80 163 162 35 4 122 88 2500 15.1 80 164 163 25.8 4 156 92 2620 14.4 81 165 164 35.1 4 81 60 1760 16.1 81 166 165 37 4 85 65 1975 19.4 81 167 166 34.1 4 91 68 1985 16 81 168 167 34.7 4 105 63 2215 14.9 81 169 168 34.4 4 98 65 2045 16.2 81 170 169 29.9 4 98 65 2380 20.7 81 171 170 28.1 4 141 80 3230 20.4 81 172 171 24.2 6 146 120 2930 13.8 81 173 172 26.6 8 350 105 3725 19 81 174 173 20.2 6 200 88 3060 17.1 81 175 174 17.6 6 225 85 3465 16.6 81 176 175 27 4 112 88 2640 18.6 82 177 176 34 4 112 88 2395 18 82 178 177 31 4 112 85 2575 16.2 82 179 178 29 4 135 84 2525 16 82 180 179 24 4 140 92 2865 16.4 82 181 180 36 4 105 74 1980 15.3 82 2 J K L car name NA NA 1 "chevrolet caprice classic" 1 "ford Itd landau" 1 "mercury grand marquis" 1 "dodge 1 "buick estate wagon 1 "ford country squire 1 "chevrolet malibu classic 1 "chrysler lebaron town 2 "ww rabbit custom" 3 "maxda glc deluxe" 1 "dodge colt hatchback 1 "amc spirit di" 2 "mercedes benz 300d" 1 "oldsmobile cutlass salon 1 "plymouth horizon tc3" 2 "fiat strada custom" 1 "buick skylark limited" 1 "oldsmobile omega brougham" 3 "toyota corolla tercel" 3 "toyota corona liftback" 3 "datsun 510 hatchback" 2 "ww rabbit c 2 "ww dasher (diesel)" 2 "audi 5000s (diesel)" 3 "honda civic 1500 3 "mazda X-7 2 "triumph tr7 coupe" 1 "dodge aries wagon 3 "honda civic 1300" 3 "datsun 210 mpg" 3 "mazda glc 4" 1 "plymouth horizon 4" 1 "ford escort 4w" 1 "ford escort 2h" 2 "peugeot 5055 turbo 3 "datsun 810 maxima" 1 "oldsmobile cutlass Is" 1 "ford granada 1 "chrysler lebaron salon" 1 "chevrolet cavalier wagon" 1 "chevrolet cavalier 2-door" 1 "pontiac 12000 se 1 "dodge aries se" 1 "ford fairmont futura" 2 "volkswagen rabbit " . es" 00 ; B 00 H I B D E F 1 1 mpg cylinders displacement horsepower weight acceleration model_year origin 182 181 37 4 91 68 2025 18.2 82 183 182 31 4 91 68 1970 17.6 82 184 183 38 4. 105 63 2125 14.7 82 185 184 36 4. 98 70 2125 17.3 82 186 185 36 4. 120 88 2160 14.5 82 187 186 32 4 91 67 1965 15.7 82 188 187 38 4 91 67 1995 16.2 82 189 188 25 6 181 110 2945 16.4 82 190 189 38 6 262 85 3015 17 82 191 190 26 4 156 92 2585 14.5 82 192 191 22 6 112 2835 14.7 82 193 192 32 4 144 96 2665 13.9 82 194 193 36 4 135 84 2370 13 82 195 194 27 4 140 86 2790 15.6 82 196 J L car name NA NA 3 "mazda glc custom 3 "mazda glc custom" 1 "plymouth horizon miser" 1 "mercury Tynx 1" 3 "nissan stanza xe" 3 "honda civic (auto)" 3 "datsun 310 gx" 1 "buick century limited" 1 "oldsmobile cutlass ciera 1 "chrysler lebaron medallion" 1 "ford granada 1" 3 "toyota celica gt" 1 "dodge charger 2.2" 1 "ford mustang 232 a) Create an appropriate training set (80%) and test set (20%) for the data b) Run a basic linear regression and identify the important variables against the training set c) Once you have a model, provide measures of accuracy (e.g. ME, MAE, MAPE, RMSE, etc). d) Run the model against the test set and provide measures of accuracy. un m nnnnnn B C D E F G H 1 mpg cylinders displacement horsepower weight acceleration model_year origin 2 1 18 8 307 130 3504 12 70 3 2 15 8 350 165 3693 11.5 70 4 3 16 8 304 150 3433 12 70 5 4 15 8 429 198 4341 10 70 6 5 14 8 440 215 4312 8.5 7 6 15 8 390 190 3850 8.5 8 7 15 8 383 170 3563 10 9 8 14 8 340 160 3609 8 10 9 15 8 400 150 3761 9.5 11 10 14 8 455 225 3086 10 12 11 24 4 113 95 2372 15 70 13 12 4 97 46 1835 20.5 70 14 13 4 107 90 2430 14.5 70 15 14 28 4 140 90 2264 15.5 71 16 15 16 6 225 105 3439 15.5 71 17 16 17 6 250 100 3329 15.5 71 18 17 19 6 250 88 3302 15.5 71 19 18 14 8 400 175 4464 11.5 71 20 19 14 8 351 153 4154 13.5 71 21 20 14 8 318 150 4096 13 71 22 21 12 8 383 180 4955 11.5 71 23 22 13 8 400 170 4746 12 71 24 23 13 8 400 175 5140 12 71 25 24 18 6 258 110 2962 13.5 71 26 25 22 4 140 72 2408 19 71 27 26 23 4 122 86 2220 14 71 28 27 31 4 71 65 1773 19 71 29 28 27 4 97 60 1834 19 71 30 29 24 4 113 95 2278 15.5 72 31 30 25 4 97.5 80 2126 17 72 32 31 23 4 97 54 2254 23.5 72 33 32 21 4 122 86 2226 16.5 72 34 33 15 8 318 150 4135 13.5 72 35 34 14 8 351 153 4129 13 72 36 35 17 8 304 150 3672 11.5 72 37 36 13 8 350 155 4502 13.5 72 38 37 12 8 350 160 4456 13.5 72 39 38 13 8 400 190 4422 12.5 72 40 39 19 3 70 97 2330 13.5 72 41 40 15 8 304 150 3892 12.5 72 42 41 13 8 307 130 4098 14 72 43 42 13 8 302 140 4294 16 72 44 43 14 8 318 150 4077 14 72 45 44 18 121 112 2933 14.5 72 46 45 22 4 121 76 2511 18 72 L car name NA NA 1 "chevrolet chevelle malibu" 1 "buick skylark 320" 1 "amc rebel sst" 1 "ford galaxie 500" 1 "plymouth fury iii" 1 "amc ambassador dpi" 1 "dodge challenger se" 1 "plymouth 'cuda 340" 1 "chevrolet monte carlo" 1 "buick estate wagon 3 "toyota corona mark 2 "volkswagen 1131 deluxe 2 "audi 100 IS" 1 "chevrolet vega 2300" 1 "plymouth satellite custom" 1 "chevrolet chevelle malibu" 1 "ford torino 500" 1 "pontiac catalina brougham" 1 "ford galaxie 500" 1 "plymouth fury 1 "dodge monaco (sw)" 1 "ford country squire 1 "pontiac safari (sw)" 1 "amc hornet sportabout 1 "chevrolet vega (sw)" 1 "mercury capri 2000" 3 "toyota corolla 1200" 2 "volkswagen model 111" 3 "toyota corona hardtop" 1 "dodge colt hardtop" 2 "volkswagen type 3" 1 "ford pinto runabout" 1 "plymouth fury 1 "ford galaxie 500" 1 "amc ambassador sst" 1 "buick lesabre custom" 1 "oldsmobile delta 88 1 "chrysler newport royal" 3 "mazda x2 coupe" 1 "amc matador (sw)" 1 "chevrolet chevelle concours 1 "ford gran torino 1 "plymouth satellite custom 2 "volvo 145e (sw)" 2 "volkswagen 411 (sw)" nnnnnn2222222222 100 44 A H1 fury 440 V6" 1 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 D E F G mpg cylinders displacement horsepower weight acceleration model_year origin 46 21 4 120 87 2979 19.5 72 47 26 4 96 69 2189 18 72 48 22 4 122 86 2395 16 72 49 28 4 97 92 2288 17 72 50 23 4 120 97 2506 14.5 72 51 28 4 98 80 2164 15 72 52 27 4 97 88 2100 16.5 72 53 13 8 350 175 4100 13 73 54 14 8 302 137 4042 14.5 73 55 15 8 318 150 3777 12.5 73 56 12 8 429 198 4952 11.5 73 57 13 8 400 150 4464 12 73 58 14 8 318 150 4237 14.5 73 59 13 8 215 4735 11 73 60 12 8 455 225 4951 11 73 61 13 8 360 175 3821 11 73 62 16 6 250 100 3278 18 73 63 26 4 97 46 1950 21 73 64 13 8 360 170 4654 13 73 65 12 8 350 180 4499 12.5 73 66 21 6 155 107 2472 14 73 67 26 4 98 90 2265 15.5 73 68 15 350 145 4082 13 73 69 16 400 230 4278 9.5 73 70 15 8 318 150 3399 11 73 71 20 6 156 122 2807 13.5 73 72 32 4 71 65 1836 21 74 73 16 6 250 100 3781 17 74 74 18 6 225 105 3613 16.5 74 75 16 8 302 140 4141 14 74 76 13 8 350 150 4699 14.5 77 14 8 318 150 4457 13.5 78 14 8 302 140 4638 16 79 14 8 304 150 4257 15.5 80 26 4 116 75 2246 14 81 19 6 225 95 3264 16 75 82 15 8 350 145 4440 14 83 16 8 318 150 4498 14.5 75 84 16 6 250 105 3897 18.5 75 85 20 8 262 110 3221 13.5 86 13 8 302 129 3169 12 75 87 33 4 91 53 1795 17.5 75 88 17.5 8 305 4215 13 76 89 16 8 318 150 4190 13 76 90 14.5 8 351 4215 12.8 76 L car name NA NA 2 "peugeot 504 (sw)" 2 "renault 12 (sw)" 1 "ford pinto (sw)" 3 "datsun 510 (sw)" 3 "toyouta corona mark 1 "dodge colt (sw)" 3 "toyota corolla 1600 1 "buick century 350" 1 "ford gran torino" 1 "dodge coronet custom" 1 "mercury marquis brougham" 1 "chevrolet caprice classic" 1 "plymouth gran 1 "chrysler new yorker 1 "buick electra 225 1 "amc ambassador brougham" 1 "chevrolet nova custom" 2 "volkswagen super beetle" 1 "plymouth custom suburb" 1 "oldsmobile vista cruiser" 1 "mercury capri 2 "fiat 124 sport 1 "chevrolet monte carlo 1 "pontiac grand prix" 1 "dodge dart custom" 3 "toyota mark ii" 3 "toyota corolla 1200" 1 "chevrolet chevelle malibu 1 "plymouth satellite sebring" 1 "ford gran torino" 1 "buick century luxus 1 "dodge coronet custom 1 "ford gran torino 1 "amc matador (sw)" 2 "fiat 124 tc" 1 "plymouth valiant custom" 1 "chevrolet bel air" 1 "plymouth grand fury" 1 "chevroelt chevelle malibu" 1 "chevrolet monza 2+2" 1 "ford mustang ii" 3 "honda civic CMCc" 1 "chevrolet chevelle malibu 1 "dodge coronet brougham" 1 "ford gran torino" 0 00 00 00 140 152 : oooo 1 L NA se" ghia" sj" d/i" premier ii" VCC" isuzu 5 gti" ES A D E F G H 1 1 mpg cylinders displacement horsepower weight acceleration model_year origin 92 91 20 6 225 100 3651 17.7 76 93 92 18 6 250 78 3574 21 76 94 93 18.5 6 250 110 3645 16.2 76 95 94 17.5 6 258 95 3193 17.8 76 96 95 13 8 318 150 3940 13.2 76 97 96 19 6 156 108 2930 15.5 76 98 97 31.5 4 98 68 2045 18.5 77 99 98 30 4 111 80 2155 14.8 77 100 99 36 4 79 58 1825 18.6 77 101 100 25.5 4 122 96 2300 15.5 77 102 101 33.5 4 85 70 1945 16.8 77 103 102 17.5 8 305 145 3880 12.5 77 104 103 17 8 260 110 4060 19 77 105 104 15.5 8 318 145 4140 13.7 77 106 105 15 8 302 130 4295 14.9 77 107 106 19 6 225 100 3630 17.7 77 108 107 16 8 400 180 4220 11.1 77 109 108 15.5 8 350 170 4165 11.4 77 110 109 29 4 97 78 1940 14.5 77 111 110 24.5 4 151 88 2740 16 77 112 111 26 4 97 75 2265 18.2 77 113 112 25.5 4 140 89 2755 15.8 77 114 113 33.5 4 98 83 2075 15.9 77 115 114 43.1 4 90 48 1985 21.5 78 116 115 32.8 4 78 52 1985 19.4 78 117 116 39.4 4 85 70 2070 18.6 78 118 117 36.1 4 91 60 1800 16.4 78 119 118 19.9 8 260 110 3365 15.5 78 120 119 20.2 8 302 139 3570 12.8 78 121 120 19.2 6 231 105 3535 19.2 78 122 121 20.2 6 200 85 2965 15.8 78 123 122 25.1 4 140 88 2720 15.4 78 124 123 20.6 6 231 105 3380 15.8 78 125 124 18.1 6 258 120 3410 15.1 78 126 125 19.2 8 305 145 3425 13.2 78 127 126 17.7 6 231 165 3445 13.4 78 128 127 17.5 8 318 140 4080 13.7 78 129 128 21.1 4 134 95 2515 14.8 78 130 129 23.8 4 151 85 2855 17.6 78 131 130 29.5 4 98 68 2135 16.6 78 132 131 21.5 6 231 115 3245 15.4 79 133 132 19.8 6 200 85 2990 18.2 79 134 133 22.3 4 140 88 2890 17.3 135 134 20.2 6 232 90 3265 18.2 136 135 20.6 6 225 110 3360 16.6 J K car name NA 1 "dodge aspen 1 "ford granada 1 "pontiac ventura 1 "amc pacer 1 "plymouth volare 3 "toyota mark 3 "honda accord 1 "buick opel 2 "renault 1 "plymouth arrow 3 "datsun f-10 1 "chevrolet caprice 1 "oldsmobile cutlass 1 "dodge monaco 1 "mercury cougar 1 "plymouth volare 1 "pontiac grand 1 "chevrolet monte 2 "volkswagen rabbit 1 "pontiac sunbird 3 "toyota corolla 1 "ford mustang 1 "dodge colt 2 "volkswagen rabbit 3 "mazda glc 3 "datsun b210 3 "honda civic 1 "oldsmobile cutlass 1 "mercury monarch 1 "pontiac phoenix 1 "ford fairmont 1 "ford fairmont 1 "buick century 1 "amc concord 1 "chevrolet monte 1 "buick regal 1 "dodge magnum 3 "toyota celica 1 "oldsmobile starfire 3 "honda accord 1 "pontiac lemans 1 "mercury zephyr 1 "ford fairmont 1 "amc concord 1 "dodge aspen hatchback" classic" supreme" brougham" brougham" custom" prix carlo custom" coupe" liftback" ii m/m" custom deluxe" ooooooooooooo 00 00 CVCC" salon ghia" lj" (auto)" (man)" special" d/I" carlo sport xe" gt SX" V6" 6" 4" dl 6" 00 00 00 00 00 st. regis" wma A B C D E F G H 1 1 mpg cylinders displacement horsepower weight acceleration model_year origin 137 136 17 8 305 130 3840 15.4 138 137 17.6 302 129 3725 13.4 139 138 16.5 351 138 3955 13.2 79 140 139 18,2 318 135 3830 15.2 141 140 16.9 350 155 4360 14.9 142 141 15.5 8 351 142 4054 14.3 143 142 19.2 8 267 125 3605 15 144 143 18.5 8 360 150 3940 13 145 144 31.9 4 89 71 1925 14 146 145 34.1 4 86 65 1975 15.2 147 146 35.7 4 98 80 1915 14.4 148 147 27.4 4 121 80 2670 15 149 148 25.4 5 183 77 3530 20.1 150 149 23.9 8 260 90 3420 22.2 151 150 34.5 4 105 70 2150 14.9 152 151 37.3 4 91 69 2130 14.7 153 152 28.4 4 151 90 2670 16 154 153 26.8 6 173 115 2700 12.9 155 154 38.1 4 89 60 1968 18.8 156 155 29.8 4 134 90 2711 15.5 157 156 37 4 119 92 2434 15 80 158 157 44.3 4 90 48 2085 21.7 159 158 43.4 4 90 48 2335 23.7 80 160 159 36.4 5 121 67 2950 19.9 80 161 160 44.6 4 91 67 1850 13.8 80 162 161 23.7 3 70 100 2420 12.5 80 163 162 35 4 122 88 2500 15.1 80 164 163 25.8 4 156 92 2620 14.4 81 165 164 35.1 4 81 60 1760 16.1 81 166 165 37 4 85 65 1975 19.4 81 167 166 34.1 4 91 68 1985 16 81 168 167 34.7 4 105 63 2215 14.9 81 169 168 34.4 4 98 65 2045 16.2 81 170 169 29.9 4 98 65 2380 20.7 81 171 170 28.1 4 141 80 3230 20.4 81 172 171 24.2 6 146 120 2930 13.8 81 173 172 26.6 8 350 105 3725 19 81 174 173 20.2 6 200 88 3060 17.1 81 175 174 17.6 6 225 85 3465 16.6 81 176 175 27 4 112 88 2640 18.6 82 177 176 34 4 112 88 2395 18 82 178 177 31 4 112 85 2575 16.2 82 179 178 29 4 135 84 2525 16 82 180 179 24 4 140 92 2865 16.4 82 181 180 36 4 105 74 1980 15.3 82 2 J K L car name NA NA 1 "chevrolet caprice classic" 1 "ford Itd landau" 1 "mercury grand marquis" 1 "dodge 1 "buick estate wagon 1 "ford country squire 1 "chevrolet malibu classic 1 "chrysler lebaron town 2 "ww rabbit custom" 3 "maxda glc deluxe" 1 "dodge colt hatchback 1 "amc spirit di" 2 "mercedes benz 300d" 1 "oldsmobile cutlass salon 1 "plymouth horizon tc3" 2 "fiat strada custom" 1 "buick skylark limited" 1 "oldsmobile omega brougham" 3 "toyota corolla tercel" 3 "toyota corona liftback" 3 "datsun 510 hatchback" 2 "ww rabbit c 2 "ww dasher (diesel)" 2 "audi 5000s (diesel)" 3 "honda civic 1500 3 "mazda X-7 2 "triumph tr7 coupe" 1 "dodge aries wagon 3 "honda civic 1300" 3 "datsun 210 mpg" 3 "mazda glc 4" 1 "plymouth horizon 4" 1 "ford escort 4w" 1 "ford escort 2h" 2 "peugeot 5055 turbo 3 "datsun 810 maxima" 1 "oldsmobile cutlass Is" 1 "ford granada 1 "chrysler lebaron salon" 1 "chevrolet cavalier wagon" 1 "chevrolet cavalier 2-door" 1 "pontiac 12000 se 1 "dodge aries se" 1 "ford fairmont futura" 2 "volkswagen rabbit " . es" 00 ; B 00 H I B D E F 1 1 mpg cylinders displacement horsepower weight acceleration model_year origin 182 181 37 4 91 68 2025 18.2 82 183 182 31 4 91 68 1970 17.6 82 184 183 38 4. 105 63 2125 14.7 82 185 184 36 4. 98 70 2125 17.3 82 186 185 36 4. 120 88 2160 14.5 82 187 186 32 4 91 67 1965 15.7 82 188 187 38 4 91 67 1995 16.2 82 189 188 25 6 181 110 2945 16.4 82 190 189 38 6 262 85 3015 17 82 191 190 26 4 156 92 2585 14.5 82 192 191 22 6 112 2835 14.7 82 193 192 32 4 144 96 2665 13.9 82 194 193 36 4 135 84 2370 13 82 195 194 27 4 140 86 2790 15.6 82 196 J L car name NA NA 3 "mazda glc custom 3 "mazda glc custom" 1 "plymouth horizon miser" 1 "mercury Tynx 1" 3 "nissan stanza xe" 3 "honda civic (auto)" 3 "datsun 310 gx" 1 "buick century limited" 1 "oldsmobile cutlass ciera 1 "chrysler lebaron medallion" 1 "ford granada 1" 3 "toyota celica gt" 1 "dodge charger 2.2" 1 "ford mustang 232 a) Create an appropriate training set (80%) and test set (20%) for the data b) Run a basic linear regression and identify the important variables against the training set c) Once you have a model, provide measures of accuracy (e.g. ME, MAE, MAPE, RMSE, etc). d) Run the model against the test set and provide measures of accuracyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started