From 77e8af54ba343aaf5dabc226fcb3e588adcac41f Mon Sep 17 00:00:00 2001 From: Matthew McDermott Date: Sun, 1 Sep 2024 15:19:14 -0400 Subject: [PATCH] Adding documentation. --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 5f6d098..c7460b6 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,27 @@ TODO ### To Add Results TODO + +## Helpers + +### To extract a task + +First, clone the repo and install it locally with `pip install .` Then, make sure you have the desired task +criteria and dataset predicates yaml files in their respective locations in the repo. + +Finally, run the following: + +```bash +./src/MEDS_DEV/helpers/extract_task.sh $MEDS_ROOT_DIR $DATASET_NAME $TASK_NAME +``` + +E.g., + +```bash +./src/MEDS_DEV/helpers/extract_task.sh ../MEDS_TAB_COMPL_TEST/MIMIC-IV/ MIMIC-IV mortality/in_icu/first_24h +``` + +which will use the `datasets/MIMIC-IV/predicates.yaml` predicates file, the +`tasks/criteria/mortality/in_icu/first_24h.yaml` task criteria, and will run over the dataset in the root +directory at `../MEDS_TAB_COMPL_TEST/MIMIC-IV`, reading data from the `data` subdir of that root dir and +writing labels to the `task_labels` subdir of that root dir, in a name dependent manner.