wfdb-python icon indicating copy to clipboard operation
wfdb-python copied to clipboard

Implement `bxb`: ANSI/AAMI-standard beat-by-beat annotation comparator

Open fabbra opened this issue 2 years ago • 2 comments

Is there a timeline for implementing the bxb function to perform beat-by-beat comparison algorithms described in ANSI/AAMI EC38:1998, the American National Standard for Ambulatory ECGs, and in ANSI/AAMI EC57:1998, the American National Standard for Testing and Reporting Performance Results of Cardiac Rhythm and ST Segment Measurement Algorithm?

See also issue https://github.com/MIT-LCP/wfdb-python/issues/222#issuecomment-959601044

fabbra avatar Nov 03 '21 16:11 fabbra

Definitely this would be a useful thing to have in the package! It's not an issue I've thought much about, but would make a nice student project. :)

One element of that would be a way to calculate exactly the same statistics that are calculated by bxb - for purposes of benchmarking it's important that the algorithm works exactly the same way. That includes handling a lot of special cases that are specific to arrhythmia analysis.

But the problem of comparing two sets of annotations based on fuzzy time matching also has more general applicability, so it would be good to implement this in a way that is more flexible, and usable outside the ECG domain (e.g. allowing the application to specify the possible "beat classes" or even a custom matching function.)

Do you have a specific task or application in mind?

bemoody avatar Nov 03 '21 18:11 bemoody

We usually use this tool to benchmark ECG QRS detection algorithms vs annotated databases according to the abovementioned standards. For the time being I guess we will have to continue using the original bxb C-code.

fabbra avatar Nov 03 '21 20:11 fabbra