dancoster / DrugLab

Repository for the drug<>lab pair
1 stars 0 forks source link

feat(Discovary Analysis): Added support to perform discovary analysis #25

Closed PavanReddy28 closed 1 year ago

PavanReddy28 commented 1 year ago
  1. Updaed ClinicalDiscovaryAnalysis class
  2. Added mannwithney test, Independent ttest
  3. Used Bonferroni and FD Analysis to get the significant medication<>lab test pairs
dancoster commented 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) Inmimic.py: row 165 : Changerange(67)torange(7)` 3) generate_med_data() does not produce the features AGE, and GENDER, and therefore the function stratify_med_data failed, please fix

PavanReddy28 commented 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

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)

  1. In mimic.py: row 165 : Change range(67) to range(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).

  1. 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