Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +4 -2
Mimic4Dataset.py
CHANGED
@@ -246,7 +246,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
246 |
self.config_path = kwargs.pop("config_path",None)
|
247 |
self.test_size = kwargs.pop("test_size",0.2)
|
248 |
self.val_size = kwargs.pop("val_size",0.1)
|
249 |
-
|
250 |
|
251 |
self.feat_cond, self.feat_chart, self.feat_proc, self.feat_meds, self.feat_out,self.path = self.create_cohort()
|
252 |
if self.encoding:
|
@@ -257,7 +257,9 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
257 |
X_train_encoded.to_csv(self.path+"/X_train_encoded.csv", index=False)
|
258 |
X_test_encoded.to_csv(self.path+"/X_test_encoded.csv", index=False)
|
259 |
X_val_encoded.to_csv(self.path+"/X_val_encoded.csv", index=False)
|
260 |
-
|
|
|
|
|
261 |
BUILDER_CONFIGS = [
|
262 |
Mimic4DatasetConfig(
|
263 |
name="Phenotype",
|
|
|
246 |
self.config_path = kwargs.pop("config_path",None)
|
247 |
self.test_size = kwargs.pop("test_size",0.2)
|
248 |
self.val_size = kwargs.pop("val_size",0.1)
|
249 |
+
|
250 |
|
251 |
self.feat_cond, self.feat_chart, self.feat_proc, self.feat_meds, self.feat_out,self.path = self.create_cohort()
|
252 |
if self.encoding:
|
|
|
257 |
X_train_encoded.to_csv(self.path+"/X_train_encoded.csv", index=False)
|
258 |
X_test_encoded.to_csv(self.path+"/X_test_encoded.csv", index=False)
|
259 |
X_val_encoded.to_csv(self.path+"/X_val_encoded.csv", index=False)
|
260 |
+
|
261 |
+
super().__init__(**kwargs)
|
262 |
+
|
263 |
BUILDER_CONFIGS = [
|
264 |
Mimic4DatasetConfig(
|
265 |
name="Phenotype",
|