Giter VIP home page Giter VIP logo

Comments (8)

berndporr avatar berndporr commented on May 28, 2024 1

If you are not familiar with causal signal processing have a watch here: https://www.youtube.com/playlist?list=PLxWwb-b9LnpCoo4GUR62sDT0-mzBt0VoV

from py-ecg-detectors.

berndporr avatar berndporr commented on May 28, 2024

What do you mean "entirely wrong positions"? Always 10 samples late? Or just random?

from py-ecg-detectors.

skjerns avatar skjerns commented on May 28, 2024

You are right indeed, they are not entirely wrong, but sometimes consistently delayed. It just looked randomly when plotted overlayed on the ECG signal. I did some further analysis:

image

Histogramplot,
y-axis: count of how many are in this bin
x-axis: wrong by how many seconds to best matching peak

~8h data with 256hz

Engzee: Perfectly like our training data
Hamilton: Quite randomly off, 
Christov: Relatively okay, but a bit off
SWT: consistently off by +-25 ms
Pan-Tompkins:  there seems to be a mismatch between R and S peak, a bimodal distribution appears
two_average: consistently off by ~70ms

from py-ecg-detectors.

berndporr avatar berndporr commented on May 28, 2024

So they are all working correctly. They are all using causal filters for realtime processing. See:
https://github.com/berndporr/py-ecg-detectors#realtime--causal-processing

from py-ecg-detectors.

skjerns avatar skjerns commented on May 28, 2024

Ah, thanks! I did read that excerpt in the README, but I interpreted it such that this applies to "most other R detectors", and not the ones in the package. Sorry for that!

Then I have two questions:

  1. Will the delay be constant across all cases, or will the delay be constant within one file?
  2. In this case only Hamilton and Pan Tompkins are off, right?

from py-ecg-detectors.

berndporr avatar berndporr commented on May 28, 2024

Well, is says "most R detectors". We've benchmarked basically all which are actively used.
Every detector will ideally introduce a constant delay independent of any other parameters but that has never been done systematically. The performance measure used in the papers is that a detector gets it right within quite a large time-window minus the constant delay. There is no good measure just now out there but I have a student doing her BEng thesis about this to come up with the perfect benchmark measure. Either way in your case the Hamilton / Pan Tompkins are off indeed. The rest look OK.

from py-ecg-detectors.

berndporr avatar berndporr commented on May 28, 2024

BTW: The Engzee detector does an "argmax" on a small section of the ECG so looks backwards through a buffer. https://github.com/berndporr/py-ecg-detectors/blob/master/ecgdetectors.py#L358
Doesn't mean that it's always right but that it will deteriorate more binary when the rough search for a peak gets it wrong and then the argmax putputs a random timestamp.

from py-ecg-detectors.

skjerns avatar skjerns commented on May 28, 2024

Thank's alot for the elaborate answer. I can work with this!

By the way, do you know any packages that perform post-detection correction? E.g. making plausible corrections to RRs, and/or removing outliers? Before I start implementing a paper.

from py-ecg-detectors.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.