close
Skip to content

[Feature] Add new ECG delineator method: Peak-Prominence (Emrich et al., 2024)#1053

Merged
DominiqueMakowski merged 5 commits into
neuropsychology:devfrom
JonasEmrich:ecg_delineate_prominence
Nov 27, 2024
Merged

[Feature] Add new ECG delineator method: Peak-Prominence (Emrich et al., 2024)#1053
DominiqueMakowski merged 5 commits into
neuropsychology:devfrom
JonasEmrich:ecg_delineate_prominence

Conversation

@JonasEmrich

Copy link
Copy Markdown
Contributor

Description

This PR adds the prominence delineator to the ecg_delineate method. The prominence delineator tries to achieve a robust and interpretable wave detection by building upon peak prominence and physiology-based search windows. [1]

Checklist

  • I have read the CONTRIBUTING file.
  • My PR is targeted at the dev branch (and not towards the master branch).
  • I ran the CODE CHECKS on the files I added or modified and fixed the errors.
  • I have added the newly added features to News.rst (if applicable)

[1] J. Emrich, A. Gargano, T. Koka and M. Muma, "Physiology-Informed ECG Delineation Based on Peak Prominence," 2024 32nd European Signal Processing Conference (EUSIPCO), Lyon, France, 2024, pp. 1402-1406, doi: 10.23919/EUSIPCO63174.2024.10715353.

Comment thread neurokit2/ecg/ecg_delineate.py Outdated
Comment thread neurokit2/ecg/ecg_delineate.py Outdated
@DominiqueMakowski

Copy link
Copy Markdown
Member

Amazing, thanks a lot!
Out of curiosity, do you have some data / info about how this compares to the other methods in terms of accuracy and speed?

Co-authored-by: Dominique Makowski <dom.mak19@gmail.com>
Comment thread neurokit2/ecg/ecg_delineate.py Outdated
@JonasEmrich

Copy link
Copy Markdown
Contributor Author

Out of curiosity, do you have some data / info about how this compares to the other methods in terms of accuracy and speed?

For processing a 30-minute single-lead ECG on a Ryzen 7 1800X, the median runtime was: DWT at 9.86 ± 1.07 s, Peak at 11.86 ± 1.83 s, and Prominence at 1.36 ± 0.75 s (excluding R-peak detection and measuring only the time of delineation).

Detection performance is always dependent on the data and evaluation criteria. Using the standard evaluation procedure from the literature (measuring the averaged min-errors over all leads), the prominence-based delineator achieved better F1-scores and lower error variability. When combining multiple leads a further performance gain can be expected.
However, detecting onsets and offsets still remains challenging. On clean and simulated data, other methods may achieve lower detection errors for these features, while the prominence method performed better in terms of F1-score and error-variability when we applied it to real-world datasets including diverse morphologies and greater variability.

Co-authored-by: Dominique Makowski <dom.mak19@gmail.com>
@DominiqueMakowski

Copy link
Copy Markdown
Member

Interesting, thanks. Please don't hesitate to let me know in the future - once maybe you gather even more evidence in favour of its superiority - if you think it should become the new default (assuming it is indeed an overall improvement for most use-cases)

Related, maybe we could add in the docstrings a sentence or two to help the user pick the method. Like e.g., "The prominence method might be useful to detect the waves, but the peak method might be more precise for detecting the onsets/offsets of the waves (but is very sensitive to signal quality and noise)" what do you think?

@DominiqueMakowski DominiqueMakowski changed the title [Feature] Add Peak-Prominence Delineator [Feature] Add new ECG delineator method: Peak-Prominence (Emrich et al., 2024) Nov 27, 2024
@JonasEmrich

Copy link
Copy Markdown
Contributor Author

Great Idea! I tried to make a fitting suggestion

Comment thread neurokit2/ecg/ecg_delineate.py
@DominiqueMakowski

Copy link
Copy Markdown
Member

Sweet, thanks again @JonasEmrich, I think we're good to go 🚀

@DominiqueMakowski DominiqueMakowski merged commit 874260b into neuropsychology:dev Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants