Mimic4Dataset / readme.md
thbndi's picture
Update readme.md
5a2035f
|
raw
history blame
5.88 kB

Configuration File Instructions

Below are the instructions to create a valid configuration file.

Configuration File Structure

The configuration file should be in YAML format (.config file) and follow the structure outlined below for ICU Data:

disease_label: <disease_label> mandatory only if the prediction task is Phenotype
timePrediction: <timePrediction>
timeWindow: <timeWindow>
timebucket: <timebucket>
radimp: <radimp>
predW: <predW>
diagnosis: <diagnosis>
output: <output>
chart: <chart>
proc: <proc>
meds: <meds>
disease_filter: <disease_filter>
icu_no_icu: <icu_no_icu>
groupingDiag: <groupingDiag>
select_diag: <select_diag>
select_med: <select_med>
select_proc: <select_proc>
select_out: <select_out>
select_chart: <select_chart>
outlier_removal: <outlier_removal>
outlier: <outlier>
left_outlier: <left_outlier>

The configuration file should be in YAML format (.config file) and follow the structure outlined below for Non-ICU Data:

disease_label: <disease_label> mandatory only if the prediction task is Phenotype
timePrediction: <timePrediction>
timeWindow: <timeWindow>
timebucket: <timebucket>
radimp: <radimp>
predW: <predW>
diagnosis: <diagnosis>
lab: <lab>
proc: <proc>
meds: <meds>
disease_filter: <disease_filter>
icu_no_icu: <icu_no_icu>
groupingDiag: <groupingDiag>
groupingProc: <groupingProc>
groupingMed: <groupingMed>
select_diag: <select_diag>
select_med: <select_med>
select_proc: <select_proc>
select_lab: <select_lab>
outlier_removal: <outlier_removal>
outlier: <outlier>
left_outlier: <left_outlier>

Replace the <variable> placeholders with the corresponding values specific to your use case. Detailed explanations of each variable and their valid values are provided in the next section.

Variable Definitions and Valid Values

  • disease_label (string): Specifies the disease label for Phenotype prediction task. Don't provide the line if the task is not Phenotype. Valid values: CAD, Heart Failure, CKD, COPD.
  • timePrediction (integer): Specifies the time prediction (days). Valid values depend on the task:
    • For Phenotype task: 30
    • For Mortality task: 0
    • For Length of Stay task: Between 1 and 10 (inclusive)
    • For Readmission task: Between 10 and 150 (inclusive), multiple of 10
  • timeWindow (string): Specifies the time window. Valid values:
    • For Phenotype or Readmission task: Last X hours (with 24 <= X >= 72)
    • For Mortality or Length of Stay tasks: First X hours (with 24 <= X >= 72)
  • timebucket (integer): Specifies the time bucket. Valid values: Between 1 and 6 (inclusive).
  • radimp (string): Specifies the imputation method. Valid values:
    • No Imputation
    • forward fill and mean
    • forward fill and median
  • predW (integer): Specifies the prediction window. Valid values depend on the task:
    • For Phenotype, Length of Stay, or Readmission tasks: 0
    • For Mortality task: Between 2 and 8 (inclusive)
  • diagnosis, output, chart, proc, meds, lab (boolean): Specifies whether to include each respective feature. Valid values: True or False.
  • disease_filter (string): Specifies the disease filter if focusing on a cohort with a specific chronic disease. Valid values:
    • Heart Failure
    • COPD
    • CKD
    • CAD
    • No Disease Filter
  • icu_no_icu (string): Specifies the dataset type. Valid values: ICU.
  • groupingDiag (string): Specifies the grouping ICD option for diagnosis. Valid values:
    • Convert ICD-9 to ICD-10 and group ICD-10 codes
    • Keep both ICD-9 and ICD-10 codes
    • Convert ICD-9 to ICD-10 codes
  • groupingMed: Specifies if grouping Medication codes should be done to use Non propietary names : Valid values : Yes, No
  • groupingProc : Specifies the ICD codes version to perform grouping for procedures : Valid values :
    • ICD-9 and ICD-10
    • ICD-10
  • select_diag, select_med, select_proc, select_out, select_chart,select_lab (boolean): Specifies whether to do features selection as describe in https://github.com/healthylaife/MIMIC-IV-Data-Pipeline benchmark. Valid values: True or False.
  • outlier_removal (string): Specifies the outlier removal method. Valid values:
    • No outlier detection
    • Impute Outlier (default:98)
    • Remove outliers (default:98)
  • outlier (integer): Specifies the outlier threshold. Valid values: Between 90 and 99 (inclusive).
  • left_outlier (integer): Specifies the left outlier threshold. Valid values: Between 0 and 10 (inclusive).

Example Configuration File

Here's an example of a valid configuration file for ICU Data:

disease_label: CAD
timePrediction: 30
timeWindow: Last 72 hours
timebucket: 2
radimp: forward fill and mean
predW: 0
diagnosis: True
output: True
chart: True
proc: True
meds: True
disease_filter: No Disease Filter
icu_no_icu: ICU
groupingICD: Convert ICD-9 to ICD-10 and group ICD-10 codes
select_diag: False
select_med: False
select_proc: False
select_out: False
select_chart: False
outlier_removal: Impute Outlier (default:98)
outlier: 98
left_outlier: 0

Here's an example of a valid configuration file for Non-ICU Data:

timePrediction: 0
timeWindow: First 48 hours
timebucket: 2
radimp: forward fill and mean
predW: 2
diagnosis: True
lab: True
proc: False
meds: False
disease_filter: CKD
icu_no_icu: ICU
groupingDiag: Convert ICD-9 to ICD-10 and group ICD-10 codes
select_diag: False
select_med: False
select_proc: False
select_lab: False
outlier_removal: Impute Outlier (default:98)
outlier: 98
left_outlier: 0
groupingMed: Yes
groupingProc: ICD-10

Feel free to modify the values to fit your specific requirements.

Usage

Provide the full path of your configuration file while calling the loading dataset function with the parameter config_path=<path_to_config_file>.

For more understanding of the configuration please refer to https://github.com/healthylaife/MIMIC-IV-Data-Pipeline.