Update Mimic4Dataset.py
Browse files- 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.
|
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.
|
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,
|