Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +3 -4
Mimic4Dataset.py
CHANGED
@@ -420,7 +420,6 @@ 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(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):
|
@@ -959,10 +958,10 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
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,
|
|
|
420 |
y_df = torch.tensor(y)
|
421 |
y_df = y_df.type(torch.LongTensor)
|
422 |
|
|
|
423 |
return stat_df, demo_df, meds, charts, out, proc, lab, y_df
|
424 |
|
425 |
def getXY(dyn,stat,demo,concat_cols,concat):
|
|
|
958 |
for key, data in dico.items():
|
959 |
|
960 |
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)
|
961 |
+
if i==998:
|
962 |
+
print('998 : \n', stat.shape, demo.shape, meds.shape, chart.shape, out.shape, proc.shape, lab.shape, y.shape)
|
963 |
if i==999:
|
964 |
+
print('\n 999 : \n', stat.shape, demo.shape, meds.shape, chart.shape, out.shape, proc.shape, lab.shape, y.shape)
|
|
|
|
|
965 |
i+=1
|
966 |
yield int(key), {
|
967 |
'label': y,
|