Jia Li
commited on
Commit
·
a4d0d18
1
Parent(s):
85f5acb
update to high frequency sample
Browse files
PTB-XL.py
CHANGED
@@ -34,7 +34,7 @@ class PTBXL(datasets.GeneratorBasedBuilder):
|
|
34 |
"ecg_id": datasets.Value("int64"),
|
35 |
"age": datasets.Value("int32"),
|
36 |
"sex": datasets.Value("string"),
|
37 |
-
"ecg_array": datasets.Array2D(shape=(
|
38 |
}
|
39 |
),
|
40 |
homepage=_HOMEPAGE,
|
@@ -70,7 +70,7 @@ class PTBXL(datasets.GeneratorBasedBuilder):
|
|
70 |
|
71 |
def _generate_examples(self, dataframe, data_dir, split):
|
72 |
for _, row in dataframe.iterrows():
|
73 |
-
ecg_path = os.path.join(data_dir, row['
|
74 |
ecg_array = np.asarray(wfdb.rdsamp(ecg_path)[0])
|
75 |
yield row.name, {
|
76 |
"ecg_id": row.name,
|
|
|
34 |
"ecg_id": datasets.Value("int64"),
|
35 |
"age": datasets.Value("int32"),
|
36 |
"sex": datasets.Value("string"),
|
37 |
+
"ecg_array": datasets.Array2D(shape=(5000, 12), dtype="float32"),
|
38 |
}
|
39 |
),
|
40 |
homepage=_HOMEPAGE,
|
|
|
70 |
|
71 |
def _generate_examples(self, dataframe, data_dir, split):
|
72 |
for _, row in dataframe.iterrows():
|
73 |
+
ecg_path = os.path.join(data_dir, row['filename_hr'])
|
74 |
ecg_array = np.asarray(wfdb.rdsamp(ecg_path)[0])
|
75 |
yield row.name, {
|
76 |
"ecg_id": row.name,
|