Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +5 -4
Mimic4Dataset.py
CHANGED
@@ -81,7 +81,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
81 |
"id": datasets.Sequence(datasets.Value("int32")),
|
82 |
"value": datasets.Sequence(datasets.Sequence(datasets.Value("float32")))
|
83 |
},
|
84 |
-
"CHART":
|
85 |
{
|
86 |
"signal" : {
|
87 |
"id": datasets.Sequence(datasets.Value("int32")),
|
@@ -91,7 +91,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
91 |
"id": datasets.Sequence(datasets.Value("int32")),
|
92 |
"value": datasets.Sequence(datasets.Sequence(datasets.Value("float32")))
|
93 |
},
|
94 |
-
}
|
95 |
"OUT": {
|
96 |
"id": datasets.Sequence(datasets.Value("int32")),
|
97 |
"value": datasets.Sequence(datasets.Sequence(datasets.Value("float32")))
|
@@ -148,14 +148,15 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
148 |
values_chart_val =[chart_features['val'][i] for i in items_chart_val ]
|
149 |
chart_val = {"id" : items_chart_val,
|
150 |
"value": values_chart_val}
|
|
|
|
|
151 |
|
152 |
yield int(hid), {
|
153 |
"gender" : gender,
|
154 |
"ethnicity" : eth,
|
155 |
"age" : age,
|
156 |
"PROC" : procs,
|
157 |
-
"CHART" :
|
158 |
-
"val" : chart_val},
|
159 |
"OUT" : outs,
|
160 |
"COND" : cond_features,
|
161 |
"label" : label
|
|
|
81 |
"id": datasets.Sequence(datasets.Value("int32")),
|
82 |
"value": datasets.Sequence(datasets.Sequence(datasets.Value("float32")))
|
83 |
},
|
84 |
+
"CHART":
|
85 |
{
|
86 |
"signal" : {
|
87 |
"id": datasets.Sequence(datasets.Value("int32")),
|
|
|
91 |
"id": datasets.Sequence(datasets.Value("int32")),
|
92 |
"value": datasets.Sequence(datasets.Sequence(datasets.Value("float32")))
|
93 |
},
|
94 |
+
},
|
95 |
"OUT": {
|
96 |
"id": datasets.Sequence(datasets.Value("int32")),
|
97 |
"value": datasets.Sequence(datasets.Sequence(datasets.Value("float32")))
|
|
|
148 |
values_chart_val =[chart_features['val'][i] for i in items_chart_val ]
|
149 |
chart_val = {"id" : items_chart_val,
|
150 |
"value": values_chart_val}
|
151 |
+
charts = {"signal" : chart_sig,
|
152 |
+
"val" : chart_val}
|
153 |
|
154 |
yield int(hid), {
|
155 |
"gender" : gender,
|
156 |
"ethnicity" : eth,
|
157 |
"age" : age,
|
158 |
"PROC" : procs,
|
159 |
+
"CHART" : charts,
|
|
|
160 |
"OUT" : outs,
|
161 |
"COND" : cond_features,
|
162 |
"label" : label
|