Beat Classification
In addition to morphology clustering, h10s uses an on-device neural network to classify individual heartbeats into standard cardiology categories.
How It Works
The application employs a TensorFlow Lite model running directly on your phone. No data is ever sent to the cloud for analysis.
- Detection: The Pan-Tompkins algorithm detects the R-peak of a heartbeat.
- Extraction: A 400ms window (centered on the peak) is extracted from the bandpass-filtered ECG signal.
- Resampling: The signal is resampled to 100 points (equivalent to 250Hz) to match the neural network's input requirements.
- Inference: The neural network analyzes the waveform and assigns a probability score to beat types (Normal, SVE, Ventricular).
- Classification: The beat is labeled with the highest-probability class. If confidence is low, it is marked as "Q" (Unclassifiable).
Classification Codes
The following codes are used in the application to label beats on the graph and in statistical summaries:
| Code |
Description |
Color |
| N |
Normal beat |
Green |
| V |
Premature ventricular contraction (PVC) |
Coral |
| S |
Supraventricular premature beat (PAC/SVE) |
Teal |
| Q |
Unclassifiable / Low Confidence |
Grey |
Accuracy & Limitations
The neural network provides a probabilistic assessment based on waveform shape.
- Motion Artifacts: Movement can distort the ECG shape, leading to false "V" or "Q" classifications. Always check the "Noise" graph.
- Lead Placement: The model expects a standard Lead I-like signal (typical of chest straps). Poor strap contact or placement can affect accuracy.
- Not a Diagnosis: This feature is for educational and informational purposes only. It does not replace clinical diagnosis by a cardiologist.