Closed PavanReddy28 closed 1 year ago
1) In constants.py
:
Change MIMIC_III_LABEVENT_PREPROCESSED' = "lab_patient_data_with_mimic_extract_names**_1**.csv" does not exist. Do you mean "lab_patient_data_with_mimic_extract_names.csv"? Please Change 2) In
mimic.py: row 165 : Change
range(67)to
range(7)`
3) generate_med_data() does not produce the features AGE, and GENDER, and therefore the function stratify_med_data failed, please fix
- In
constants.py
: Change `MIMIC_III_LABEVENT_PREPROCESSED' = "lab_patient_data_with_mimic_extract_names_1.csv" does not exist. Do you mean "lab_patient_data_with_mimic_extract_names.csv"? Please Change
If you are running main_v2.ipynb
, please change the parse
function parameters to load_from_raw
atleast once. After the 1st time you don't need to generate the datasets from scratch.
As you haven't generated the datasets from scratch you are getting the file does not exits error.
parse
function parameters to generate preprocessed datasets:
m_med1, m_med2, m_labs = mimic_parser.parse(use_pairs=False, load_from_raw=True, load_raw_chartevents=True)
- In
mimic.py
: row 165 : Changerange(67)
torange(7)
Why do we need to do that Dan? This is part of combining LABEVENTS
and CHARTEVENTS
tables, ie, one time operation. After the first time we don't run it again so 67 (the total partitions is a fixed number (unless you change the partition size).
- generate_med_data() does not produce the features AGE, and GENDER, and therefore the function stratify_med_data failed, please fix
We are generating AGE
and adding GENDER
data in the below lines (code already in the main branch).
AGE
- https://github.com/dancoster/DrugLab/blob/main/src/parsers/mimic.py#L54
GENDER
- Comes from PATIENT
table, which is merged with the medication data on line : https://github.com/dancoster/DrugLab/blob/main/src/parsers/mimic.py#L39