thbndi commited on
Commit
21a8d72
·
1 Parent(s): 4f51f82

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +2 -2
Mimic4Dataset.py CHANGED
@@ -845,7 +845,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
845
  features = datasets.Features(
846
  {
847
  "label": datasets.ClassLabel(num_classes=2,names=["0", "1"]),
848
- "onehot" : datasets.Array2D(shape=(1,None), dtype="float32"),
849
  }
850
  )
851
  return datasets.DatasetInfo(
@@ -893,7 +893,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
893
  label = data['label']
894
  demo=demo.drop(['label'],axis=1)
895
  X= getXY(dyn_df,cond_df,demo,concat_cols,True)
896
- X=X.to_numpy()
897
  yield int(i), {
898
  "label": label,
899
  "onehot": X,
 
845
  features = datasets.Features(
846
  {
847
  "label": datasets.ClassLabel(num_classes=2,names=["0", "1"]),
848
+ "onehot" : datasets.Sequence(datasets.Value("float32")),
849
  }
850
  )
851
  return datasets.DatasetInfo(
 
893
  label = data['label']
894
  demo=demo.drop(['label'],axis=1)
895
  X= getXY(dyn_df,cond_df,demo,concat_cols,True)
896
+ X=X.values.tolist()[0]
897
  yield int(i), {
898
  "label": label,
899
  "onehot": X,