Mimic4Dataset / readme.md
thbndi's picture
Update readme.md
ea54d7b
|
raw
history blame
4.08 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:

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>
groupingICD: <groupingICD>
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>

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. Valid values: CAD, Heart Failure, CKD, COPD.
  • timePrediction (integer): Specifies the time prediction. 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 (boolean): Specifies whether to include each respective flag. Valid values: True or False.
  • disease_filter (string): Specifies the disease filter. Valid values:
    • Heart Failure
    • COPD
    • CKD
    • CAD
    • No Disease Filter
  • icu_no_icu (string): Specifies the dataset type. Valid values: ICU.
  • groupingICD (string): Specifies the grouping ICD option. 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
  • select_diag, select_med, select_proc, select_out, select_chart (boolean): Specifies whether to select each respective option. 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:

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

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>. To use the check_config function, pass the task name and the path to your configuration file as arguments: