Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +3 -4
Mimic4Dataset.py
CHANGED
@@ -10,7 +10,7 @@ from sklearn.model_selection import train_test_split
|
|
10 |
from sklearn.preprocessing import LabelEncoder
|
11 |
import yaml
|
12 |
import numpy as np
|
13 |
-
from .dataset_utils import vocab, concat_data, generate_deep, generate_ml, generate_text
|
14 |
from .task_cohort import create_cohort
|
15 |
|
16 |
|
@@ -479,7 +479,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
479 |
dico = pickle.load(fp)
|
480 |
|
481 |
for key, data in dico.items():
|
482 |
-
stat, demo, meds, chart, out, proc, lab, y = generate_deep(data,self.interval, self.config.name.replace(" ","_"), self.feat_cond, self.feat_proc, self.feat_out, self.feat_chart, self.feat_meds,self.feat_lab,self.condDict, self.procDict, self.outDict, self.chartDict, self.medDict)
|
483 |
if self.verif_dim_tensor(proc, out, chart, meds, lab, self.interval):
|
484 |
if self.data_icu:
|
485 |
yield int(key), {
|
@@ -534,8 +534,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
534 |
def _info(self):
|
535 |
self.path = self.init_cohort()
|
536 |
self.interval = (self.timeW//self.bucket)
|
537 |
-
self.size_cond, self.size_proc, self.size_meds, self.size_out, self.size_chart, self.size_lab, eth_vocab,gender_vocab,age_vocab,ins_vocab=vocab(self.config.name.replace(" ","_"),self.feat_cond,self.feat_proc,self.feat_out,self.feat_chart,self.feat_meds,self.feat_lab)
|
538 |
-
self.condDict, self.procDict, self.outDict, self.chartDict, self.medDict = open_dict(self.config.name.replace(" ","_"),self.feat_cond,self.feat_proc,self.feat_out,self.feat_chart,self.feat_lab,self.feat_meds)
|
539 |
if (self.encoding == 'concat' or self.encoding =='aggreg'):
|
540 |
return self._info_encoded()
|
541 |
|
|
|
10 |
from sklearn.preprocessing import LabelEncoder
|
11 |
import yaml
|
12 |
import numpy as np
|
13 |
+
from .dataset_utils import vocab, concat_data, generate_deep, generate_ml, generate_text
|
14 |
from .task_cohort import create_cohort
|
15 |
|
16 |
|
|
|
479 |
dico = pickle.load(fp)
|
480 |
|
481 |
for key, data in dico.items():
|
482 |
+
stat, demo, meds, chart, out, proc, lab, y = generate_deep(data,self.interval, self.config.name.replace(" ","_"), self.feat_cond, self.feat_proc, self.feat_out, self.feat_chart, self.feat_meds,self.feat_lab,self.condDict, self.procDict, self.outDict, self.chartDict, self.medDict, self.eth_vocab,self.gender_vocab,self.age_vocab,self.ins_vocab)
|
483 |
if self.verif_dim_tensor(proc, out, chart, meds, lab, self.interval):
|
484 |
if self.data_icu:
|
485 |
yield int(key), {
|
|
|
534 |
def _info(self):
|
535 |
self.path = self.init_cohort()
|
536 |
self.interval = (self.timeW//self.bucket)
|
537 |
+
self.size_cond, self.size_proc, self.size_meds, self.size_out, self.size_chart, self.size_lab, self.eth_vocab,self.gender_vocab,self.age_vocab,self.ins_vocab,self.condDict,self.procDict,self.medDict,self.outDict,self.chartDict,self.labDict=vocab(self.config.name.replace(" ","_"),self.feat_cond,self.feat_proc,self.feat_out,self.feat_chart,self.feat_meds,self.feat_lab)
|
|
|
538 |
if (self.encoding == 'concat' or self.encoding =='aggreg'):
|
539 |
return self._info_encoded()
|
540 |
|