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.

  1. Detection: The Pan-Tompkins algorithm detects the R-peak of a heartbeat.
  2. Extraction: A 400ms window (centered on the peak) is extracted from the bandpass-filtered ECG signal.
  3. Resampling: The signal is resampled to 100 points (equivalent to 250Hz) to match the neural network's input requirements.
  4. Inference: The neural network analyzes the waveform and assigns a probability score to beat types (Normal, SVE, Ventricular).
  5. 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.