File size: 4,637 Bytes
ae8488f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7dbbfd1
ae8488f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# 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**:

```yaml
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>
```

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

```yaml
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
groupingDiag: 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>`.

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