Medical history

As we discussed in Chapter 2Healthcare Foundations, individuals that have chronic conditions are usually less healthy and have poorer health outcomes than those who do not have chronic health conditions. The dataset includes information on the presence of 11 common chronic conditions for each visit. These conditions are cancer, cerebrovascular disease, chronic obstructive pulmonary disease, a condition requiring dialysis, congestive heart failure, dementia, diabetes, history of myocardial infarction, history of pulmonary embolism or deep vein thrombosis, and HIV/AIDS. Because past medical history is often available electronically for previously seen patients and is usually established early during patient triage, we have decided to include these variables here. Because they are already binary, no processing of these variables is needed.

There is also a continuous variable, called TOTCHRON, that tallies the total number of chronic disease for each patient, which we mean-impute as follows:

X_train.loc[:,'TOTCHRON'] = X_train.loc[:,'TOTCHRON'].apply(pd.to_numeric)
X_test.loc[:,'TOTCHRON'] = X_test.loc[:,'TOTCHRON'].apply(pd.to_numeric)

X_train = mean_impute_values(X_train,'TOTCHRON')
X_test = mean_impute_values(X_test,'TOTCHRON')

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset