Question: Section B - practical Section B contains only obe question which has several parte (refirted to here as items). in this section you seed to
Section B - practical Section B contains only obe question which has several parte (refirted to here as items). in this section you seed to prowide the required answers clearly, as meationed in each iten. For mane ilees you peved to provide your final auswer in the polf file of yout answer script (cogetber with the auswers from previcas puestions), and bor sooe items goa seed to generate a cov file. For the isems where you bave been ashed to penerate a csv file you aeed to ZIP them allegether and sabanit it in Bsoodle as a singlo file in the requirod subaninion peiat. Furtbermore. you need to also subanit your fisal code that oostaims char esplanation. (in the coble) for eech part. estion 6. (30 marks). Consider the date set "Hospial_dis_nateesv" that contains information of 26 patients. The duta is oollected by a nurey togardine Hospitaliations of patients where in the fint colama the IDs of the patients is stored, and in the reanaiaing oolumes some numerical valoes for ansiety level, aloobol relited illsenes index, tisbetes indrox. and dischange rate are stored. (a) Geperate a data matrix D where the roms aseciate with each potient, and oolumns with paticut's ID, saciety, abobod re, diabete and diechatgo tates respectively. Provide D as a cov file. (b) Groerate is data maitix D where the roess asociate with each patient, and columns witb only unviety, akohol re and diabetes: nspertively. Prowide D as a esv file. (c) Geiesate a matrix G that stoies the Borlikwn distanoe betwen patient i and j, that is in ench eutry 9, of G the Eacluken dir tane of rom i from column j of D is stoced. Proside G as a esv file. 1. Print (in your code) the 55 sub-matrix G of G, where 09i for 1i,j5. Provide the matrix G in your pat fle. 6. Find all petienss with 'miex' and 'min' dastances, sepanately and lat theen (provide the potient's ID). Provide the lists in year paif file (carefully explain which list is which). \begin{tabular}{|r|r|r|r|r|} \hline \multicolumn{1}{|l}{ A } & \multicolumn{1}{c}{ B } & \multicolumn{1}{c}{ C } & \multicolumn{1}{c|}{ D } & \multicolumn{1}{c|}{ E } \\ \hline ID & \multicolumn{1}{|c|}{ Anxiety_Di } & Alcohol re & Diabetes & Discharges \\ \hline 1 & 393.6089968 & 270.1776041 & 69.63788301 & 9590.103093 \\ \hline 2 & 132.8350144 & 177.8638329 & 43.50304521 & 8955.508619 \\ \hline 3 & 142.4761626 & 147.3471426 & 18.72004792 & 8240.135205 \\ \hline 4 & 201.7047303 & 406.6627627 & 90.11173856 & 13394.28351 \\ \hline 5 & 261.6488435 & 250.7088222 & 56.95842035 & 10486.75914 \\ \hline 6 & 240.8579466 & 178.4458509 & 60.97782955 & 8939.144091 \\ \hline 7 & 129.5930109 & 245.7798483 & 25.99222493 & 10150.26498 \\ \hline 8 & 123.4567901 & 320.9876543 & 18.07228916 & 9593.675308 \\ \hline 9 & 261.0254013 & 214.2745831 & 89.01116686 & 9951.332561 \\ \hline 10 & 182.4503425 & 289.1665806 & 35.96181509 & 9021.9925 \\ \hline 11 & 173.8480536 & 264.8339507 & 20.8466966 & 8406.328381 \\ \hline 12 & 321.2943573 & 252.4455664 & 77.38046754 & 9320.090346 \\ \hline 13 & 187.1106795 & 179.2157141 & 42.36735758 & 7749.135194 \\ \hline 14 & 175.294814 & 326.6857897 & 38.70145244 & 8613.297151 \\ \hline 15 & 223.9966269 & 189.7383192 & 43.08642419 & 9155.004523 \\ \hline 16 & 169.5736434 & 123.6740106 & 39.20338717 & 9222.021591 \\ \hline 17 & 530.465048 & 765.295425 & 122.2765674 & 13381.60398 \\ \hline 18 & 108.4206722 & 184.7167008 & 42.91510612 & 11743.72848 \\ \hline 19 & 300.6943305 & 250.9430868 & 59.37660684 & 10005.47836 \\ \hline 20 & 260.065498 & 96.32055481 & 74.00430571 & 8206.680795 \\ \hline 21 & 268.9019138 & 308.8170417 & 62.41677763 & 11310.10795 \\ \hline 22 & 509.5248809 & 494.0563243 & 114.1622017 & 12540.81158 \\ \hline 23 & 436.0354895 & 218.6496802 & 110.467779 & 11480.19041 \\ \hline 24 & 169.135565 & 183.5641914 & 43.94500596 & 7512.066274 \\ \hline 25 & 294.2595273 & 246.0202605 & 38.51420746 & 8301.67119 \\ \hline 26 & 461.3719246 & 233.3133651 & 120.1976584 & 12642.67401 \\ \hline & & & & \\ \hline \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
