thbndi commited on
Commit
52d29a4
1 Parent(s): 6e3b7ae

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +6 -4
Mimic4Dataset.py CHANGED
@@ -426,10 +426,12 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
426
  demo=demo.drop(['label'],axis=1)
427
  X= generate_ml(dyn_df,cond_df,demo,concat_cols,self.concat)
428
  X=X.values.tolist()[0]
429
- yield int(i), {
430
- "label": label,
431
- "features": X,
432
- }
 
 
433
  ######################################################DEEP###############################################################
434
  def _info_deep(self):
435
  features = datasets.Features(
 
426
  demo=demo.drop(['label'],axis=1)
427
  X= generate_ml(dyn_df,cond_df,demo,concat_cols,self.concat)
428
  X=X.values.tolist()[0]
429
+ size = self.size_cond+ self.size_proc * (self.timeW//self.bucket) + self.size_meds* (self.timeW//self.bucket)+ self.size_out* (self.timeW//self.bucket)+ self.size_chart* (self.timeW//self.bucket)+ self.size_lab* (self.timeW//self.bucket) + 4
430
+ if len(X)==size:
431
+ yield int(i), {
432
+ "label": label,
433
+ "features": X,
434
+ }
435
  ######################################################DEEP###############################################################
436
  def _info_deep(self):
437
  features = datasets.Features(