Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

JonasEmrich
Copy link
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.

@DominiqueMakowski
Copy link
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 <[email protected]>
@JonasEmrich
Copy link
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 <[email protected]>
@DominiqueMakowski
Copy link
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
Contributor Author

Great Idea! I tried to make a fitting suggestion

@DominiqueMakowski
Copy link
Member

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

@DominiqueMakowski DominiqueMakowski merged commit 874260b into neuropsychology:dev Nov 27, 2024
8 checks passed
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