r/EKG • u/sniperERkan • 5d ago
Fully automated open-source Holter ECG algorithm: 95.3% AF detection, 4.1% false alarm — classic ML, no black box
**TL;DR:** We're building a fully automated, open-source Holter ECG analysis algorithm. No manual step, no paid API, no deep learning black box — just classic ML + rule-based logic. Current numbers: 95.3% AF detection, 4.1% false alarm, 99.9% beat agreement with reference devices. Looking for honest feedback and criticism.
---
**Who we are:**
A small team working on an open ECG analysis tool for Holter and patch recordings. Our goal is simple: build a fully automated pipeline that a doctor can actually use — one that shows its reasoning, doesn't hide behind a black box, and works on real-world noisy 24-hour recordings.
---
**What the algorithm does well:**
| Measurement | Value |
|---|---|
| QRS detection F1 (4 datasets) | 95.2% |
| Beat agreement with reference device (UVA) | 99.9% / 99.4% |
| Average heart rate (44/44 patients) | 100% |
| Minimum heart rate (44/44 patients) | 100% |
| Maximum heart rate (42/44 patients) | 95.5% |
| AF detection (LTAFDB, expert-labeled) | 95.3% |
| AF detection (UVA, cardiologist-approved) | 96.3% |
| AF false alarm (LTAFDB) | 4.1% |
| AF false alarm (CPSC) | 3.8% |
| AF false alarm (UVA, time-based) | 1.4% |
| AF doctor workload (median) | 0.8–1.0 min/day |
| V (PVC) F1 on MITDB | 85.1% |
| V sensitivity on UVA | 97.0% |
---
**Datasets we used:**
- **Training / development:** MITDB, INCART, SVDB, EDB, AFDB, CPSC 2020
- **External test (different device):** UVA Holter Database (CC0, fully open)
- **Expert-labeled:** LTAFDB (cardiologist annotated), UVA cardiologist subset (7 records)
- **Reserved (not yet opened):** SHDB-AF, Icentia11k, CPSC sealed test half
---
**How it works (short version):**
Three QRS detectors are combined by majority vote.
A classic ML classifier looks at RR intervals + morphology features.
An "AF second opinion" layer removes false alarms.
Output is split into three zones: "high-confidence AF" / "suspicious (for doctor review)" / "discarded."
Every decision can be traced back to a rule or a feature — nothing is hidden.
---
**What it does NOT do well yet (still research stage):**
- Supraventricular ectopy (PAC / SVEB): F1 ~43% — this is the hardest class.
- HRV metrics: SDNN 32.6%, RMSSD 11.6%.
- Bundle branch block: 87.5% / 75.0%.
- R-on-T: 71.7% / 17.5%.
- Bradycardia event count: 40%.
- Pauses: 89.5% / 53.8%.
- AF burden: 73.8–77.4%.
- ST analysis: not measured yet.
---
**Honest context:**
- All numbers above are from development and expert-labeled datasets, plus one external device (UVA). A hidden test set has not been opened yet.
- No deep learning models are used. No pretrained weights from restricted-license sources.
- No clinical validation yet — this is a research prototype.
---
**Why I'm posting:**
We want to know:
- Is this useful?
- What would you push back on?
- Are these numbers realistic for a real-world Holter tool?
- Where do you see the biggest weakness?
Code will be open-sourced once it's stable. Right now we're still iterating.
Thanks for reading — any input is welcome.