thbndi commited on
Commit
7793b31
·
1 Parent(s): d4733d8

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +4 -3
Mimic4Dataset.py CHANGED
@@ -255,7 +255,7 @@ def getXY_deep(data,task,feat_cond,feat_proc,feat_out,feat_chart,feat_meds):
255
  dyn_temp=dyn_df[keys[key]]
256
  dyn_temp=dyn_temp.to_numpy()
257
  dyn_temp=np.nan_to_num(dyn_temp,copy=False)
258
- dyn_temp=list(dyn_temp)
259
  dyn[key]=dyn_temp
260
 
261
  for k in range(len(keys)):
@@ -271,7 +271,8 @@ def getXY_deep(data,task,feat_cond,feat_proc,feat_out,feat_chart,feat_meds):
271
  lab=dyn[k]
272
 
273
  stat=cond_df
274
- stat=list(stat.to_numpy())
 
275
 
276
  y = demo['label']
277
 
@@ -280,7 +281,7 @@ def getXY_deep(data,task,feat_cond,feat_proc,feat_out,feat_chart,feat_meds):
280
  demo["insurance"].replace(ins_vocab, inplace=True)
281
  demo["Age"].replace(age_vocab, inplace=True)
282
  demo=demo[["gender","ethnicity","insurance","Age"]]
283
- demo=demo.values
284
 
285
  return stat, demo, meds, chart, out, proc, lab, y
286
 
 
255
  dyn_temp=dyn_df[keys[key]]
256
  dyn_temp=dyn_temp.to_numpy()
257
  dyn_temp=np.nan_to_num(dyn_temp,copy=False)
258
+ dyn_temp=dyn_temp.tolist()
259
  dyn[key]=dyn_temp
260
 
261
  for k in range(len(keys)):
 
271
  lab=dyn[k]
272
 
273
  stat=cond_df
274
+ stat=stat.to_numpy()
275
+ stat=stat.tolist()
276
 
277
  y = demo['label']
278
 
 
281
  demo["insurance"].replace(ins_vocab, inplace=True)
282
  demo["Age"].replace(age_vocab, inplace=True)
283
  demo=demo[["gender","ethnicity","insurance","Age"]]
284
+ demo=demo.values.tolist()
285
 
286
  return stat, demo, meds, chart, out, proc, lab, y
287