Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +2 -3
Mimic4Dataset.py
CHANGED
@@ -444,12 +444,11 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
444 |
demo=demo.drop(['label'],axis=1)
|
445 |
X= generate_ml(dyn_df,cond_df,demo,concat_cols,self.concat)
|
446 |
X=X.values.tolist()[0]
|
|
|
447 |
interv = ((self.timeW + self.PredW)//self.bucket) + (self.config.name != 'Mortality')
|
448 |
size_concat = self.size_cond+ self.size_proc * interv + self.size_meds * interv+ self.size_out * interv+ self.size_chart *interv+ self.size_lab * interv + 4
|
449 |
size_aggreg = self.size_cond+ self.size_proc + self.size_meds+ self.size_out+ self.size_chart+ self.size_lab + 4
|
450 |
-
|
451 |
-
print('size_concat: ', size_concat)
|
452 |
-
print('interv: ', interv)
|
453 |
if ((self.concat and len(X)==size_concat) or ((not self.concat) and len(X)==size_aggreg)):
|
454 |
yield int(i), {
|
455 |
"label": label,
|
|
|
444 |
demo=demo.drop(['label'],axis=1)
|
445 |
X= generate_ml(dyn_df,cond_df,demo,concat_cols,self.concat)
|
446 |
X=X.values.tolist()[0]
|
447 |
+
|
448 |
interv = ((self.timeW + self.PredW)//self.bucket) + (self.config.name != 'Mortality')
|
449 |
size_concat = self.size_cond+ self.size_proc * interv + self.size_meds * interv+ self.size_out * interv+ self.size_chart *interv+ self.size_lab * interv + 4
|
450 |
size_aggreg = self.size_cond+ self.size_proc + self.size_meds+ self.size_out+ self.size_chart+ self.size_lab + 4
|
451 |
+
|
|
|
|
|
452 |
if ((self.concat and len(X)==size_concat) or ((not self.concat) and len(X)==size_aggreg)):
|
453 |
yield int(i), {
|
454 |
"label": label,
|