Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +6 -3
Mimic4Dataset.py
CHANGED
@@ -420,7 +420,7 @@ def getXY_deep(data,task,feat_cond,feat_proc,feat_out,feat_chart,feat_meds):
|
|
420 |
y_df = torch.tensor(y)
|
421 |
y_df = y_df.type(torch.LongTensor)
|
422 |
|
423 |
-
print(
|
424 |
return stat_df, demo_df, meds, charts, out, proc, lab, y_df
|
425 |
|
426 |
def getXY(dyn,stat,demo,concat_cols,concat):
|
@@ -957,9 +957,12 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
957 |
task=self.config.name.replace(" ","_")
|
958 |
i=0
|
959 |
for key, data in dico.items():
|
960 |
-
print(i,key)
|
961 |
-
stat, demo, meds, chart, out, proc, lab, y = getXY_deep(data, task, self.feat_cond, self.feat_proc, self.feat_out, self.feat_chart, self.feat_meds)
|
962 |
|
|
|
|
|
|
|
|
|
|
|
963 |
i+=1
|
964 |
yield int(key), {
|
965 |
'label': y,
|
|
|
420 |
y_df = torch.tensor(y)
|
421 |
y_df = y_df.type(torch.LongTensor)
|
422 |
|
423 |
+
print(charts.shape)
|
424 |
return stat_df, demo_df, meds, charts, out, proc, lab, y_df
|
425 |
|
426 |
def getXY(dyn,stat,demo,concat_cols,concat):
|
|
|
957 |
task=self.config.name.replace(" ","_")
|
958 |
i=0
|
959 |
for key, data in dico.items():
|
|
|
|
|
960 |
|
961 |
+
stat, demo, meds, chart, out, proc, lab, y = getXY_deep(data, task, self.feat_cond, self.feat_proc, self.feat_out, self.feat_chart, self.feat_meds)
|
962 |
+
if i==999:
|
963 |
+
print('999 : \n' stat, demo, meds, chart, out, proc, lab, y)
|
964 |
+
if i==1000:
|
965 |
+
print('\n 1000 : \n' stat, demo, meds, chart, out, proc, lab, y)
|
966 |
i+=1
|
967 |
yield int(key), {
|
968 |
'label': y,
|