From a8ef2404764bc39d525e16a1f375441750d61dd9 Mon Sep 17 00:00:00 2001 From: Russell Anderson <5637107+rpanderson@users.noreply.github.com> Date: Sun, 28 Jun 2020 23:59:06 +1000 Subject: [PATCH 1/2] Example use of mdinclude directive for benchmarks/ecg_preprocessing Use m2r for the mdinclude directive and recommonmark for everything else, per https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992. To make this work, I had to additionally: * Use HTML for any hyperlinks in bold/italics; * Relative link figures from docs directory, i.e. prepend ../../benchmarks/ecg_preprocessing to image paths; and * Remove line blank lines from references div. --- benchmarks/ecg_preprocessing/README.md | 64 +++++++++++--------------- docs/benchmarks/ecg_preprocessing.rst | 2 +- docs/conf.py | 13 ++++-- docs/environment.yml | 1 + 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/benchmarks/ecg_preprocessing/README.md b/benchmarks/ecg_preprocessing/README.md index 4a1c164587..2f50928956 100644 --- a/benchmarks/ecg_preprocessing/README.md +++ b/benchmarks/ecg_preprocessing/README.md @@ -1,7 +1,7 @@ # Benchmarking of ECG Preprocessing Methods -*This study can be referenced by* [*citing the package*](https://github.com/neuropsychology/NeuroKit#citation). +This study can be referenced by citing the package. **We'd like to publish this study, but unfortunately we currently don't have the time. If you want to help to make it happen, please contact us!** @@ -22,9 +22,9 @@ running on a treadmill, using a hand bike). The sampling rate is 250Hz for all the conditions. The script to download and format the database using the -[**ECG-GUDB**](https://github.com/berndporr/ECG-GUDB) Python package by +ECG-GUDB Python package by Bernd Porr can be found -[**here**](https://github.com/neuropsychology/NeuroKit/blob/dev/data/gudb/download_gudb.py). +here. ### MIT-BIH Arrhythmia Database @@ -35,7 +35,7 @@ including common but clinically significant arrhythmias (denoted as the `MIT-Arrhythmia-x` database). The script to download and format the database using the can be found -[**here**](https://github.com/neuropsychology/NeuroKit/blob/dev/data/mit_arrhythmia/download_mit_arrhythmia.py). +here. @@ -48,7 +48,7 @@ Due to memory limits, we only kept the second hour of recording of each participant. The script to download and format the database using the can be found -[**here**](https://github.com/neuropsychology/NeuroKit/blob/dev/data/mit_normal/download_mit_normal.py). +here. @@ -177,7 +177,7 @@ data %>% scale_fill_manual(values=colors) ``` -![](figures/unnamed-chunk-6-1.png) +![](../../benchmarks/ecg_preprocessing/figures/unnamed-chunk-6-1.png) **Conclusion:** It seems that `gamboa2008` and `martinez2003` are particularly prone to errors, especially in the case of a noisy ECG @@ -212,7 +212,7 @@ data %>% ylab("Duration (seconds per data sample)") ``` -![](figures/unnamed-chunk-8-1.png) +![](../../benchmarks/ecg_preprocessing/figures/unnamed-chunk-8-1.png) @@ -269,7 +269,7 @@ means %>% ylab("Duration (seconds per data sample)") ``` -![](figures/unnamed-chunk-9-1.png) +![](../../benchmarks/ecg_preprocessing/figures/unnamed-chunk-9-1.png) **Conclusion:** It seems that `gamboa2008` and `neurokit` are the fastest methods, followed by `martinez2003`, `kalidas2017`, @@ -302,7 +302,7 @@ data %>% ylab("Amount of Error") ``` -![](figures/unnamed-chunk-10-1.png) +![](../../benchmarks/ecg_preprocessing/figures/unnamed-chunk-10-1.png) ##### Statistical Modelling @@ -335,7 +335,7 @@ means %>% ylab("Amount of Error") ``` -![](figures/unnamed-chunk-11-1.png) +![](../../benchmarks/ecg_preprocessing/figures/unnamed-chunk-11-1.png) **Conclusion:** It seems that `neurokit`, `kalidas2017` and `christov2004` the most accurate algorithms to detect R-peaks. This @@ -430,7 +430,7 @@ data %>% ylab("Amount of Error") ``` -![](figures/unnamed-chunk-15-1.png) +![](../../benchmarks/ecg_preprocessing/figures/unnamed-chunk-15-1.png) ##### Statistical Modelling @@ -461,7 +461,7 @@ means %>% ylab("Amount of Error") ``` -![](figures/unnamed-chunk-16-1.png) +![](../../benchmarks/ecg_preprocessing/figures/unnamed-chunk-16-1.png) ### Conclusion @@ -471,28 +471,18 @@ method. # References