ECG Beat Classifier

A thesis model that labels every heartbeat of a single-lead ECG as normal, supraventricular or ventricular. Pick a recording, then run the model on it.

Loading…

–

Not run yet. Press Run the model to label these beats.

Stretch
On screen

Click any beat on the ECG to see why the model labels it that way.

How it works

The model gets one ECG lead and the time of every R-peak, the tall spike of each beat. Here the R-peaks come from the database annotations; the model has no beat detector of its own.

Clean the signal

Breathing and movement make the signal drift. Two median filters (200 ms, then 600 ms) estimate the drift, and it is subtracted. A notch removes mains hum at 50 and 60 Hz, a low-pass removes everything above 35 Hz, and every database is resampled to 128 samples per second. The filters run forwards and backwards, so no beat moves in time.

Results on patients the model never saw

Five test sets: held-out patients of the two training databases, and three databases never used in training, from other hospitals, devices and leads. Every number comes from the evaluation in the thesis.

F1 combines how many beats of a class are found with how many calls are right. Macro F1 averages it over N, S and V, so the rare classes count as much as normal beats. The lines are 95% intervals from resampling patients 2,000 times: how much the score depends on which patients happen to be tested.