This repository contains the source code to reproduce the experiments presented in the paper entitled "Event-Triggered Sensing for Wearable Medical Systems: Highway to High Accuracy and Low Energy Consumption".
Diffusion Event-Based Adaptive ECG Sampling (public)
Recent Commits
Recent Commits
Commit | Author | Details | Committed | ||||
---|---|---|---|---|---|---|---|
706e3a1a8602 | tomas.teijeiro | Added full validation results to the README file. | Apr 3 2019 | ||||
f5c0730d2d6a | tomas.teijeiro | Code to reproduce the experiments. | Mar 1 2019 |
README.md
README.md
Event-Triggered Sensing for Wearable Medical Systems: Highway to High Accuracy and Low Energy Consumption
This repository contains the source code to reproduce the experiments presented in the paper:
- G. Surrel, T. Teijeiro, A. Aminifar and D. Atienza: *Event-Triggered Sensing for Wearable Medical Systems: Highway to High Accuracy and Low Energy Consumption*, IEEE Design & Test Magazine, 2019 (Submitted)
All the code is implemented in Python 3. The detailed list of dependencies and the procedure to get the results is explained below.
Running the experiments
- Install the WFDB software package.
- Install the following python packages:
- Download and extract the version 2.0 of the Construe software.
- Put the [experiments.py](experiments.py) script in the root folder of the Construe package you just downloaded.
- Download the full MIT-BIH Arrhythmia Database.
- Modify the DB_DIR variable in the [experiments.py](experiments.py) to point to the directory containing the MIT-BIH Arrhythmia Database.
- For each of the records (except 102 and 104), run the [experiments.py](experiments.py) script (this will generate the QRS annotation files for that record and print the average sampling frequency of the adaptive method): ~$ python experiments.py recname
- In the directory containing the MIT-BIH Arrhythmia Database there will be two sets of annotation files: *.gqrs (detected QRS complexes on the original signals) and *.wbs (detected QRS complexes on the subsampled signals). They can be analyzed with the standard [bxb](https://www.physionet.org/physiotools/wag/bxb-1.htm) and [sumstats](https://www.physionet.org/physiotools/wag/sumsta-1.htm) tools to obtain the sensitivity and positive predictive values in comparison with the manual *.atr annotations. For example: ~$ bxb -r 100 -a atr wds -l file1 file2 ~$ bxb -r 101 -a atr wds -l file1 file2 . . . ~$ sumstats file1 > validation_WDS.txt
Detailed results
The table below shows the disaggregated sensitivity, positive predictivity, F1 score and average sampling frequency (fs) for each of the compared methods with each evaluated record from the MIT-BIH Arrhythmia Database (PS: Periodic sampling, CS: Compressed Sensing, LC: Level-Crossing, KB: Knowledge-based). For PS and CS the sampling frequency is not included, since it is constant in both cases (360 and 180 Hz, respectively).
Record | PS Se | PS +P | PS F1 | CS Se | CS +P | CS F1 | LC Se | LC +P | LC F1 | LC fs | KB Se | KB +P | KB F1 | KB fs |
--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
100 | 100.00 | 100.00 | 100.00 | 99.89 | 100.00 | 99.94 | 100.00 | 100.00 | 100.00 | 32.80 | 100.00 | 100.00 | 100.00 | 12.56 |
101 | 99.93 | 99.87 | 99.90 | 99.87 | 99.87 | 99.87 | 99.93 | 99.87 | 99.90 | 33.18 | 99.93 | 99.87 | 99.90 | 9.52 |
103 | 99.94 | 100.00 | 99.97 | 99.88 | 100.00 | 99.94 | 99.94 | 100.00 | 99.97 | 43.90 | 99.94 | 100.00 | 99.97 | 11.44 |
105 | 99.68 | 98.99 | 99.33 | 99.49 | 99.08 | 99.28 | 99.44 | 98.66 | 99.05 | 44.07 | 99.54 | 99.12 | 99.33 | 11.94 |
106 | 99.94 | 99.88 | 99.91 | 99.82 | 99.94 | 99.88 | 99.82 | 99.88 | 99.85 | 45.59 | 99.88 | 99.88 | 99.88 | 13.57 |
107 | 99.83 | 99.94 | 99.88 | 99.72 | 100.00 | 99.86 | 99.78 | 99.94 | 99.86 | 76.21 | 98.32 | 99.94 | 99.12 | 11.35 |
108 | 99.39 | 99.73 | 99.56 | 99.12 | 99.53 | 99.32 | 98.58 | 98.58 | 98.58 | 30.38 | 99.05 | 99.39 | 99.22 | 23.32 |
109 | 99.90 | 100.00 | 99.95 | 99.81 | 100.00 | 99.90 | 99.90 | 100.00 | 99.95 | 49.23 | 99.71 | 100.00 | 99.85 | 8.57 |
111 | 99.55 | 100.00 | 99.77 | 99.44 | 100.00 | 99.72 | 99.44 | 100.00 | 99.72 | 32.74 | 99.61 | 100.00 | 99.80 | 14.31 |
112 | 100.00 | 100.00 | 100.00 | 99.95 | 100.00 | 99.97 | 100.00 | 100.00 | 100.00 | 28.82 | 100.00 | 100.00 | 100.00 | 16.14 |
113 | 100.00 | 99.87 | 99.93 | 99.93 | 99.80 | 99.86 | 100.00 | 99.87 | 99.93 | 50.07 | 100.00 | 100.00 | 100.00 | 11.20 |
114 | 100.00 | 100.00 | 100.00 | 99.94 | 100.00 | 99.97 | 100.00 | 100.00 | 100.00 | 40.77 | 100.00 | 100.00 | 100.00 | 8.43 |
115 | 100.00 | 100.00 | 100.00 | 99.94 | 100.00 | 99.97 | 100.00 | 100.00 | 100.00 | 47.44 | 100.00 | 100.00 | 100.00 | 11.15 |
116 | 99.16 | 99.85 | 99.50 | 99.01 | 99.85 | 99.43 | 98.96 | 99.90 | 99.43 | 70.13 | 99.16 | 99.85 | 99.50 | 12.36 |
117 | 100.00 | 100.00 | 100.00 | 99.92 | 100.00 | 99.96 | 100.00 | 100.00 | 100.00 | 29.38 | 100.00 | 100.00 | 100.00 | 15.48 |
118 | 100.00 | 99.95 | 99.97 | 99.95 | 100.00 | 99.97 | 100.00 | 99.95 | 99.97 | 57.95 | 100.00 | 100.00 | 100.00 | 19.49 |
119 | 100.00 | 99.76 | 99.88 | 99.94 | 99.64 | 99.79 | 100.00 | 99.70 | 99.85 | 50.18 | 100.00 | 99.94 | 99.97 | 11.26 |
121 | 99.94 | 99.94 | 99.94 | 99.87 | 100.00 | 99.93 | 99.74 | 99.94 | 99.84 | 20.72 | 99.81 | 99.94 | 99.87 | 7.73 |
122 | 100.00 | 100.00 | 100.00 | 99.95 | 100.00 | 99.97 | 100.00 | 100.00 | 100.00 | 45.89 | 100.00 | 100.00 | 100.00 | 9.74 |
123 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 41.28 | 100.00 | 100.00 | 100.00 | 11.34 |
124 | 99.93 | 100.00 | 99.96 | 99.85 | 100.00 | 99.92 | 99.85 | 100.00 | 99.92 | 37.24 | 99.78 | 100.00 | 99.89 | 6.92 |
Record | PS Se | PS +P | PS F1 | CS Se | CS +P | CS F1 | LC Se | LC +P | LC F1 | LC fs | KB Se | KB +P | KB F1 | KB fs |
200 | 99.86 | 99.82 | 99.84 | 99.82 | 99.91 | 99.86 | 99.82 | 99.82 | 99.82 | 46.14 | 99.86 | 99.82 | 99.84 | 16.88 |
201 | 98.22 | 99.40 | 98.81 | 97.90 | 99.27 | 98.58 | 97.04 | 99.93 | 98.46 | 19.11 | 97.50 | 100.00 | 98.73 | 12.78 |
202 | 99.57 | 99.95 | 99.76 | 99.52 | 99.95 | 99.73 | 99.52 | 100.00 | 99.76 | 35.30 | 99.63 | 100.00 | 99.81 | 10.44 |
203 | 98.35 | 99.11 | 98.73 | 97.94 | 99.31 | 98.62 | 98.19 | 98.86 | 98.52 | 55.19 | 97.78 | 98.78 | 98.28 | 20.31 |
205 | 99.36 | 100.00 | 99.68 | 99.27 | 100.00 | 99.63 | 99.32 | 100.00 | 99.66 | 31.20 | 99.32 | 100.00 | 99.66 | 13.13 |
207 | 99.94 | 99.56 | 99.75 | 99.94 | 99.81 | 99.87 | 99.62 | 99.37 | 99.49 | 30.24 | 99.12 | 99.43 | 99.27 | 9.30 |
208 | 99.18 | 99.88 | 99.53 | 99.18 | 99.92 | 99.55 | 99.43 | 99.88 | 99.65 | 51.96 | 99.34 | 99.92 | 99.63 | 17.18 |
209 | 100.00 | 100.00 | 100.00 | 99.96 | 100.00 | 99.98 | 100.00 | 100.00 | 100.00 | 52.97 | 100.00 | 100.00 | 100.00 | 18.03 |
210 | 98.19 | 99.91 | 99.04 | 98.00 | 99.91 | 98.95 | 97.96 | 99.95 | 98.94 | 31.01 | 97.69 | 99.91 | 98.79 | 12.16 |
212 | 100.00 | 100.00 | 100.00 | 99.91 | 100.00 | 99.95 | 100.00 | 100.00 | 100.00 | 57.20 | 100.00 | 100.00 | 100.00 | 15.64 |
213 | 99.96 | 100.00 | 99.98 | 99.85 | 100.00 | 99.92 | 99.93 | 100.00 | 99.96 | 86.82 | 99.89 | 100.00 | 99.94 | 15.94 |
214 | 100.00 | 100.00 | 100.00 | 99.95 | 100.00 | 99.97 | 100.00 | 99.95 | 99.97 | 45.92 | 99.79 | 99.79 | 99.79 | 9.11 |
215 | 99.93 | 100.00 | 99.96 | 99.86 | 100.00 | 99.93 | 99.96 | 100.00 | 99.98 | 56.22 | 99.93 | 100.00 | 99.96 | 21.80 |
217 | 99.84 | 99.89 | 99.86 | 99.78 | 99.89 | 99.83 | 99.84 | 99.89 | 99.86 | 56.15 | 99.84 | 99.89 | 99.86 | 13.12 |
219 | 100.00 | 98.50 | 99.24 | 99.94 | 96.57 | 98.23 | 100.00 | 98.99 | 99.49 | 44.30 | 100.00 | 98.66 | 99.33 | 13.28 |
220 | 100.00 | 100.00 | 100.00 | 99.94 | 100.00 | 99.97 | 100.00 | 100.00 | 100.00 | 48.38 | 100.00 | 100.00 | 100.00 | 11.85 |
221 | 99.90 | 100.00 | 99.95 | 99.85 | 100.00 | 99.92 | 99.95 | 100.00 | 99.97 | 39.17 | 99.75 | 100.00 | 99.87 | 14.24 |
222 | 99.29 | 99.95 | 99.62 | 98.82 | 100.00 | 99.41 | 98.87 | 100.00 | 99.43 | 30.70 | 99.53 | 99.91 | 99.72 | 18.76 |
223 | 99.95 | 100.00 | 99.97 | 99.91 | 100.00 | 99.95 | 99.95 | 100.00 | 99.97 | 42.16 | 99.86 | 100.00 | 99.93 | 12.62 |
228 | 99.88 | 99.65 | 99.76 | 99.88 | 99.77 | 99.82 | 99.82 | 99.65 | 99.73 | 35.40 | 99.53 | 99.18 | 99.35 | 16.74 |
230 | 100.00 | 100.00 | 100.00 | 99.95 | 100.00 | 99.97 | 100.00 | 100.00 | 100.00 | 49.53 | 100.00 | 99.95 | 99.97 | 12.80 |
231 | 100.00 | 100.00 | 100.00 | 99.92 | 100.00 | 99.96 | 100.00 | 100.00 | 100.00 | 35.79 | 100.00 | 100.00 | 100.00 | 11.21 |
232 | 100.00 | 99.53 | 99.76 | 100.00 | 99.66 | 99.83 | 100.00 | 99.40 | 99.70 | 23.27 | 100.00 | 99.46 | 99.73 | 17.46 |
233 | 99.92 | 100.00 | 99.96 | 99.88 | 99.96 | 99.92 | 99.92 | 99.96 | 99.94 | 56.61 | 99.92 | 99.96 | 99.94 | 22.06 |
234 | 99.96 | 100.00 | 99.98 | 99.91 | 100.00 | 99.95 | 99.96 | 100.00 | 99.98 | 41.71 | 99.96 | 100.00 | 99.98 | 10.80 |
Gross | 99.73 | 99.85 | 99.79 | 99.64 | 99.82 | 99.73 | 99.66 | 99.83 | 99.74 | 43.70 | 99.62 | 99.84 | 99.73 | 13.62 |
License
The code is licensed under the terms of the [GPL v3 license](LICENSE).
c4science · Help