Injury codes

Injury codes are also included in the data. While the reason-for-visit codes apply to all visits, injury codes only apply if the patient has undergone either physical injury, poisoning, or adverse effects of medical treatment (including suicide attempts). Because the exact reason for injury may not be known until a full workup has been performed, and that workup usually occurs after a decision to admit has already been made. Therefore, we will remove the injury code variables, since they potentially contain future information that will not be available at prediction time. However, if you wish to use such codes for your modeling task, remember that coded data can be processed in a manner similar to that shown earlier. Refer to the documentation for additional details on injury variables:

inj_cols = [
'INJURY','INJR1','INJR2','INJPOISAD','INJPOISADR1',
'INJPOISADR2','INTENT','INJDETR','INJDETR1','INJDETR2',
'CAUSE1','CAUSE2','CAUSE3','CAUSE1R','CAUSE2R','CAUSE3R'
]

X_train.drop(inj_cols, axis=1, inplace=True)
X_test.drop(inj_cols, axis=1, inplace=True)

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

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