Question: 1. Work with thediabetesdata set insklearn, and with the functionnumpy.cov. Include your source code in each case (text in main writeup, actual.py source file attached
1. Work with thediabetesdata set insklearn, and with the functionnumpy.cov. Include your source code in each case (text in main writeup, actual.py source file attached separately), as well as the resulting output, in addition to adescription of your approach and of the results.
(a) Compute the covariance matrix of the set of non-target attributes of the data set.What is the shape (size) of the resulting matrix?
(b) Compute the correlation of theageandbpattributes,directly from the elementsof the covariance matrix. Explain your procedure.
(c)Based on the result of the preceding part, would you expect older patients in thisdata set to have higher blood pressure than younger ones, or lower blood pressure,on average? Explain.
(d) Check whether the data are consistent with your assessment in the preceding part,by computing the median blood pressure among older patients (those whose ageis larger than the mean) and the median blood pressure among younger patients(those whose age is smaller than the mean). Consult the data set documentation as needed. What is the difference between the median values, expressed as anumber of standard deviations of the blood pressure attribute?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
