jherng commited on
Commit
4a158e7
·
1 Parent(s): 4736f23

Update rsna-2023-abdominal-trauma-detection.py

Browse files
rsna-2023-abdominal-trauma-detection.py CHANGED
@@ -44,8 +44,6 @@ class RSNA2023AbdominalTraumaDetectionConfig(datasets.BuilderConfig):
44
  self.test_size = kwargs.pop("test_size", 0.1)
45
  self.random_state = kwargs.pop("random_state", 42)
46
  super(RSNA2023AbdominalTraumaDetectionConfig, self).__init__(**kwargs)
47
- print(f"test_size: {self.test_size}")
48
- print(f"random_state: {self.random_state}")
49
 
50
 
51
  class RSNA2023AbdominalTraumaDetection(datasets.GeneratorBasedBuilder):
@@ -163,10 +161,6 @@ class RSNA2023AbdominalTraumaDetection(datasets.GeneratorBasedBuilder):
163
  )
164
 
165
  def _split_generators(self, dl_manager):
166
- print(self.config)
167
- print(self.config.test_size)
168
- print(self.config.random_state)
169
-
170
  # segmentation: 206 segmentations and the relevant imgs, train_series_meta.csv, train_dicom_tags.parquet
171
  # classification: 4711 all imgs, train.csv, train_series_meta.csv, train_dicom_tags.parquet
172
  # classification-with-mask: 206 segmentations and the relevant imgs, train.csv, train_series_meta.csv, train_dicom_tags.parquet
@@ -243,7 +237,7 @@ class RSNA2023AbdominalTraumaDetection(datasets.GeneratorBasedBuilder):
243
  )
244
 
245
  train_series_meta_df, test_series_meta_df = train_test_split(
246
- series_meta_df, test_size=0.1, random_state=42, shuffle=True
247
  )
248
 
249
  return [
 
44
  self.test_size = kwargs.pop("test_size", 0.1)
45
  self.random_state = kwargs.pop("random_state", 42)
46
  super(RSNA2023AbdominalTraumaDetectionConfig, self).__init__(**kwargs)
 
 
47
 
48
 
49
  class RSNA2023AbdominalTraumaDetection(datasets.GeneratorBasedBuilder):
 
161
  )
162
 
163
  def _split_generators(self, dl_manager):
 
 
 
 
164
  # segmentation: 206 segmentations and the relevant imgs, train_series_meta.csv, train_dicom_tags.parquet
165
  # classification: 4711 all imgs, train.csv, train_series_meta.csv, train_dicom_tags.parquet
166
  # classification-with-mask: 206 segmentations and the relevant imgs, train.csv, train_series_meta.csv, train_dicom_tags.parquet
 
237
  )
238
 
239
  train_series_meta_df, test_series_meta_df = train_test_split(
240
+ series_meta_df, test_size=self.config.test_size, random_state=self.config.random_state, shuffle=True
241
  )
242
 
243
  return [