Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +4 -2
Mimic4Dataset.py
CHANGED
@@ -426,8 +426,10 @@ 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 |
-
|
430 |
-
|
|
|
|
|
431 |
yield int(i), {
|
432 |
"label": label,
|
433 |
"features": X,
|
|
|
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_concat = 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 |
+
size_aggreg = self.size_cond+ self.size_proc + self.size_meds+ self.size_out+ self.size_chart+ self.size_lab + 4
|
431 |
+
|
432 |
+
if (len(X)==size_concat or len(X)==size_aggreg):
|
433 |
yield int(i), {
|
434 |
"label": label,
|
435 |
"features": X,
|