thbndi commited on
Commit
4b8afb3
1 Parent(s): f7c0216

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +6 -5
Mimic4Dataset.py CHANGED
@@ -214,21 +214,22 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
214
 
215
 
216
  def verif_dim_tensor(self, proc, out, chart, meds, lab):
 
217
  verif=True
218
  if self.feat_proc:
219
- if (len(proc)!=((self.timeW + self.predW)//self.bucket)):
220
  verif=False
221
  if self.feat_out:
222
- if (len(out)!=((self.timeW + self.predW)//self.bucket)):
223
  verif=False
224
  if self.feat_chart:
225
- if (len(chart)!=((self.timeW + self.predW)//self.bucket)):
226
  verif=False
227
  if self.feat_meds:
228
- if (len(meds)!=((self.timeW + self.predW)//self.bucket)):
229
  verif=False
230
  if self.feat_lab:
231
- if (len(lab)!=((self.timeW + self.predW)//self.bucket)):
232
  verif=False
233
  return verif
234
 
 
214
 
215
 
216
  def verif_dim_tensor(self, proc, out, chart, meds, lab):
217
+ interv = ((self.timeW + self.predW)//self.bucket) + (self.config.name != 'Mortality')
218
  verif=True
219
  if self.feat_proc:
220
+ if (len(proc)!= interv):
221
  verif=False
222
  if self.feat_out:
223
+ if (len(out)!=interv):
224
  verif=False
225
  if self.feat_chart:
226
+ if (len(chart)!=interv):
227
  verif=False
228
  if self.feat_meds:
229
+ if (len(meds)!=interv):
230
  verif=False
231
  if self.feat_lab:
232
+ if (len(lab)!=interv):
233
  verif=False
234
  return verif
235